Ad
Log in to vote
0

Terminal GUI timer?

Asked by 7 years ago

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

Log in to vote
0
Answered by 7 years ago

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

Ad

Answer this question