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

This script works in Run, but not Play Solo. Why is that?

Asked by 10 years ago
number = 0

while true do
    number = number + 1
        wait()
        game.StarterGui.ScoreGui.Number.Text = number
    wait(.5)
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?

1 answer

Log in to vote
3
Answered by 10 years ago

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

Ad

Answer this question