Hello, everyone. I am currently developing an Arena shooter and for some reason, the timer displays the time as -284839:29, the seconds being the only thing that is correct. I don't know why it's doing this, but any help would be greatly appreciated!
Spawn(function()
while roundTimerText.Parent do
wait(0.2)
if IsInRound and PlayRounds then
local seconds = math.floor(RoundLength-(tick()-RoundStartTime))
local minutes = math.floor(seconds/60)
seconds = seconds - minutes*60
if seconds < 10 then
roundTimerText.Text = minutes..':0'..seconds
else
roundTimerText.Text = minutes..':'..seconds
end
else
script.RoundChange.Event:wait()
end
end
end)
UPDATE The round timer displays minutes correctly, but with the randomness in front of it. An example would be if the time left is 4:15 seconds, then the clock will display it as -2594394:15.

2 comments
Obviously because you use tick() you gain a large number.
Would an alternative be to use (RoundLength-1-RoundStartTime)) ?