I think you need to use BBCodeText.Width and BBCodeText.Height - the width and height of text object.
.
TextWidth and TextHeight properties are for measuring the actual text. (for example you can stretch the text object to be 1000px wide, but if you put only one word in it, TextWidth will return 50px)
TextWidth and TextHeight become available after a small delay, because the system needs time to render the text. You are trying to access them on every tick, and that's probably why you are getting the error. Or maybe your text is empty. Or there is a bug in BBCode addon.. Who knows :)