So. I need some script that can turn this secounds to minutes and secounds intead of just secounds but i didint know how to make that so well, i am asking you guys now. so hope someone of you can help me turn this secounds into secounds and minutes like this for example (3:58) -- (3:08) -- (1:01) -- (15)
Here is the current script.
function mss(t) -- Time in seconds
return string.format(
"%.1d:%.2d", -- Format. Number with minimum 1 digit, number with minimum 2 digits
t/60, -- Minutes
t%60 -- Seconds
)
end
local Time = 300
local GameOverWait = 5 -- how long the GameOver text is on the screen.
while true do
for i = Time,0,-1 do
script.Parent.Times.Value = Time..i
script.Parent.TimeLeft.Text = mss(Time)
wait(1)
end
if script.Parent.Times.Value == 3000 then -- if local Time = 4 then add a 0 to the number.
script.Parent.Parent.GameOver.Visible = true
wait(GameOverWait)
script.Parent.Parent.GameOver.Visible = false
end
end

1 comment
mss(i)