while true do
print(1)
if Seconds > 9 and Milliseconds > 9 then
TimeRemainingText.Text = ("%s : %s"):format(tostring(Seconds,Milliseconds))
print("case 1")
elseif Seconds > 9 and Milliseconds < 9 then
TimeRemainingText.Text = ("%s : 0%s"):format(tostring(Seconds,Milliseconds))
print("case 2")
elseif Seconds < 9 and Milliseconds > 9 then
TimeRemainingText.Text = ("0%s : %s"):format(tostring(Seconds,Milliseconds))
print("case 3")
elseif Seconds < 9 and Milliseconds < 9 then
TimeRemainingText.Text = ("0%s : 0%s"):format(tostring(Seconds,Milliseconds))
print("case 4")
end
print(2)
if Milliseconds == 0 then Seconds -= 1 Milliseconds = 99 end
Milliseconds -= 1
print(3)
if Seconds == 0 and Milliseconds == 0 then break end
print(4)
task.wait()
print("reached")
end
And the issue seems to be the if block. If I remove it, it all works, and the loop continues. But if it stays, only “1” prints in the output. What’s going on?
Only thing I can think of is that there is an error somewhere, which maybe you haven’t noticed, which is yielding the entire script. Double check the output, maybe? If that doesn’t work try printing “case 1” and so on before setting the TimeRemainingText and see if that changes anything
All I see differently is this line. I might not be seeing any changes you’ve made. The code doesn’t reach the print(2) line, so I don’t see how it could change anything
Ah, I’m sorry, I didn’t see that part. And looking back, this is how a tostring() should even look like. Let me try the change and see if it works, and by now I could say your code is the solution.