function MinsToSecs(dec)
local MinutesAndSeconds = tonumber(dec)
if MinutesAndSeconds/60 <= 1 then
return math.floor(MinutesAndSeconds % 60)
else
if MinutesAndSeconds % 60 < 10 then
return math.floor(MinutesAndSeconds / 60)..":0"..(MinutesAndSeconds % 60)
else
return math.Floor(MinutesAndSeconds / 60)..":"..(MinutesAndSeconds % 60)
end
end
end
function intermission()
local intermissionTime = 70
for i = 1, intermissionTime do
wait(1)
intermissionTime = intermissionTime - 1
message.Value = " "..MinsToSecs(intermissionTime).." "
end
end
I've made a minutes to seconds function to work with the intermission. I tested it, and between the seconds switched from over 60 seconds to under 60 seconds, the text for the timer gui (called message in the portion of the script showed above) switched to 0 for about a second and switched back to the regular time. I have no idea how to fix this, but does someone else?
2 comments
Errr.. Didn't work as planned. When the seconds part goes has a number less than two digits, the first digit doesn't switch do a 0 like the original script that I posted. Thanks for trying, though
Ahh, I figured out the problem now. I needed to switch where the if statements are to make the script run more efficiently.