Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Terminal GUI timer?

Time = script.Parent.Time code = game.Workspace.Terminal.raidtime.Value

while true do Time.Text = "RAIDTIME:".." "..code wait(1) end

Why won't this work? It changes to

RAIDTIME: 400 but wont go down or up just stays...

Help!

1 answer

Could be because you assigned a value to a variable, looped over that variable with no means to increment or decrement that variable...just a guess though, probably has something to do with global warming.

A variable assignment is a snapshot in time, no matter how dynamic the value is that you assigned to that variable, once it's assigned, it's static until you tell it to do otherwise.

Try in your loop:

while true do

Time.Text = "RAIDTIME: "..code

code=code-1

wait(1)

end

This discussion is preserved as it was. New answers, comments, and votes are closed.