DO NOT USE A LOOP (this is to the previous answer)
The reason it doesn't work is that the variable val is an actual number. You can't do .Changed on a number. Here is a complete fix:
local text = script.Parent
local val = script.Parent.cash
text.Text = val.Value
val.Changed:Connect(function()
text.Text = val.Value
end)
When using Variables to define a value, do not put .Value at the end. This is because you want a updating value. The current value will always stay the same if you use the Variable again.
Hopefully, this helped you solve your problem!
If you have any errors Comment below.
Best of luck developer!
1 comment
Sorry, I messed the title up. I mean the text label changes only one time.