I'm trying to make a round timer with intermission, etc, (I have everything else set up) but the timer doesn't stop at 0, it goes into the negatives. Also, I don't know if I made the other parts correctly since I can't get past this part, thanks in advance if you are able to help.
while true do wait(1) script.Parent.Text = script.Parent.Text - 1 if script.Value.Value == 0 then wait(162) script.Parent.Text = "Intermission" wait(20) script.Parent.Text = 60 end end
You can use a for
loop instead:
function Countdown() for i = 60, 0, -1 do -- 60 = start, 0 = goal, -1 = step to reach goal, i = progress wait(1) script.Parent.Text = i end end function Loop() Countdown() -- note that any code below a for loop will not run until the loop is finished wait(162) script.Parent.Text = "Intermission" wait(20) Loop() -- repeat function end Loop()