StageNo = game.ServerStorage.StageNo.Value while true do script.Parent.Text = StageNo wait(0.01) end
so im trying to make it so that the text changes to 1 when i hit something i printed out the value when i hit it and it come out with one(which is good) however, it doesnt afect the text value. Why? How do i fix it?
This is quite a common mistake, slightly hard to explain but quite simple: target the Value object, not the .Value
itself.
What I mean by this is instead of using Value.Value
, you use Value
and change the .Value
property.
StageNo = game.ServerStorage.StageNo while true do script.Parent.Text = StageNo.Value wait() end
To put this into simplicity, when setting a variable to a property, it only sets itself to the property and doesn't affect it. In order to change the property you need to target the object itself, then add your property you want to change. Kinda hard to wrap your head around first but once you understand it it's easy.