1 | number = 0 |
2 |
3 | while true do |
4 | number = number + 1 |
5 | wait() |
6 | game.StarterGui.ScoreGui.Number.Text = number |
7 | wait(. 5 ) |
8 | end |
It works when I press Run, but when I join the game or play solo, it does not work. Does anybody have a solution?
In studio mode all GUIs in StarterGui are shown to your screen for easy editting of them. You should never be trying to affect the GUIs in there since a clone of all of them are sent to the Player when they join the game. Instead, put that code in a LocalScript in StarterGui and use script.Parent.ScoreGui.Number.Text = number