databrainJoin Date: 2013-01-01 Post Count: 3342 |
Whenever I use TextBounds, in my local script, on my TextLabel, it returns Vector2.new(0, 0).
My script is local, and my TextLabel doesn't have TextScaled set to true. Any help on this?
Is TextBounds no longer supported? It doesn't seem to work in online mode. |
|
cntkillmeJoin Date: 2008-04-07 Post Count: 49450 |
Try waiting before getting it so it can render |
|
|
|
(I found this to be annoying. I am 90% certain its JUST being a descendant of a PlayerGui and being renderable, IDK if Visible affects it) |
|
cntkillmeJoin Date: 2008-04-07 Post Count: 49450 |
I don't think Visible affects it but when I used to use TextBounds, adding a wait usually fixed my problem of it returning (0, 0) |
|
|
cntkillme: Don't wait, just check TextBounds after its parented and it will function correctly (IDK if it being offscreen affects it, I know being hidden by ClipsDescendants doesn't) |
|
cntkillmeJoin Date: 2008-04-07 Post Count: 49450 |
Wouldn't it already be parented if he just puts it in a GUI in StarterGui? Or are you assuming he is Instance.newing? |
|
|
I am assuming he is cloning it from somewhere, checking TextBounds, then parenting it last. |
|
cntkillmeJoin Date: 2008-04-07 Post Count: 49450 |
Probably.
Anyway the scenario I was talking about (or at least it was like this a year ago) was when I had a GUI in starterGUI but I couldn't instantly check textbounds (example being: print(script.Parent.Label.TextBounds)), but after adding a wait it seemed to work.
Maybe it was something wrong on my part. |
|
|
Unless I do something wrong I never have that issue... Maybe they fixed it, but I don't remember a year ago or if I had a chat GUI a year ago (The largest use I use it for) |
|
cntkillmeJoin Date: 2008-04-07 Post Count: 49450 |
I think I was using a BillboardGUI actually, parent being StarterGui and adronee'd to some part in workspace. |
|
databrainJoin Date: 2013-01-01 Post Count: 3342 |
So, it has to be parented?
That's a pain. I was meaning to make it not show the text until it calculated the positions based off the text length.
Allthough, if it's clipped by ClipDescendants, will it still work? |
|
|
They wont notice, so why does it matter? |
|