I have a timer but on 4 minutes and 59 seconds it stops counting down.
(There’s more to the script but I’m only showing the timer part of the code.
while true do
s = 0
m = 5
repeat
debounce = true
wait(1)
s = s-1
if s == -1 then
m = m-1
s = 59
if m == -1 then
m = 0
s = 0
end
end
until s == 0 and m == 0
debounce = false--(there's debounce in the script for the other parts of the code.)
return debounce
end
end
Well, its a part that gives you a gear when you touch it then when you get the gear the timer starts. After that timer is finished you can get the gear again.
for m=5,0,-1 do
for s=60,0,-1 do
print(m,":",i)--time
wait(1)
end
end
or another variant
for i = 120, 0, -1 do
local minutes = math.floor(i/60)
local seconds = math.floor(i%60)
clocktext.Text = string.format("%i:%.2i", minutes, seconds)
wait(1)
end
is this a Type of Timer Script? i Think theres a Mess up in the Script, ill Be Glad to Help Solve This Issue With this Problem DM Me on Discord or here Soda_DevRBLX#8064
for i = (5 * 60), 1, -1 do
m = math.floor(i / 60)
s = i % 60
print(m..":"..(s < 10 and "0" or "")..s) -- formatting example
wait(1)
end
-- countdown over
debounce = false
You can use a for loop but then check when it reaches 0 then minus 1 off the minutes and add 59 to the seconds. I shall go make a script now and get back to you.
Well, its a part that gives you a gear when you touch it then when you get the gear the timer starts. After that timer is finished you can get the gear again. (Timer is displayed for everyone)