Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Does TextLabel.Text show the current text?

local text = TextLabel.Text

I took it from a part of my script. But it is not working.

Does this check like what text it has? Lets say I put "100" in the Text. Does it show 100 in the variable?

local text = "100"

Basically , is this two scripts the exact same thing if I put "100" in the Text?

1 answer

✓ Accepted answer

You want to reference the TextLabel itself, rather than TextLabel.Text, if you want to be able to see changes. Something like this:

Script one

local textLabel = TextLabel -- your text label here
textLabel.Text = "100"

Then in another script if you check the text value it will have the updated value: Script two

local textLabel = TextLabel
print(textLabel.Text) -- will print "100", assuming this code runs after the code above

This discussion is preserved as it was. New answers, comments, and votes are closed.