Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

TextLabel text isn't changing even the value is changing?

Asked by 4 years ago
script.Parent.TextLabel.Text = script.Parent.Parent.Parent.Parent.CurrencyToCollect.Value

CurrencyToCollect value is changing, but the textlabel text isn't

0
Hard to tell what is wrong with only those two lines of code deth836231 142 — 4y
0
What else would you need to know? I am not getting any error, and the TextLabel isnt changing even though the value is changing. headlessbamba 0 — 4y
0
Yeah, believe it or not, we can't tell you what works or doesn't because only two lines of code is basically useless to us. s_iara 94 — 4y
0
I am asking, what else do you need to know...? headlessbamba 0 — 4y
0
Well, what else is in the script? Did you add 'wait()' if needed? Stuff like that. s_iara 94 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago

Assuming that they are your only lines of code and you are using a localscript, you will need to listen for the Changed event.

script.Parent.Parent.Parent.Parent.CurrencyToCollect.Changed:Connect(function()
    script.Parent.TextLabel.Text = script.Parent.Parent.Parent.Parent.CurrencyToCollect.Value
end)
Ad

Answer this question