I have a script that changes the text of a GUI every second, as a countdown timer.
intermissionTime = 5*60
while true do
local intermission = game.StarterGui.ScreenGui.Intermission
local timeLeftIntermission = intermission.IntermissionTime
intermission.Visible = true
timeLeftIntermission.Text = intermissionTime
intermissionTime = intermissionTime - 1
print(timeLeftIntermission.Text)
wait(1)
end
When I run the script, the GUI changes as it should...counting down every second from 300. But when I Play the game, it doesn't, but simply stays at 300. I added a print line to check what was going wrong, and it says that it is changing, but it isn't. This is not the first time this has happened. Why doesn't this work?

2 comments
Using while loops for "countdowns" is unnecessary & repetitive. All you need to use is a for loop instead of a while loop: http://wiki.roblox.com/index.php?title=Loops#For
That is true, but also irrelevant. The problem is not the loop; it's the GUI. The loop works fine, but the GUI isn't changing when I Play the game, though it is when I Run it.