MainItems.CashButton.ScreenPart.SurfaceGui.TextLabel = Values.CashValue.Value
COMMUNITY QUESTION
TextLabel is not a valid member of SurfaceGui?
1 answer
Hey there! I am guessing that your problem is occurring for one reason: the TextLabel doesn't have enough time to load before this script runs. You can solve this by using WaitForChild()
Try this, and let me know if it solves it:
MainItems.CashButton.ScreenPart.SurfaceGui:WaitForChild("TextLabel") = Values.CashValue.Value
1 comment
0
Also, if you are trying to set the text, I would change it to TextLabel.Text
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
Can you elaborate? When does this script run?
when i start the game in studio