I’m looking to make a timer that counts down from 10 minutes to 0 with real time. So once it goes from XX:10 to XX:20, I want to make it do something.
But not only that I want it to reset back to 10 minutes each time the countdown is over. All of this while displaying the text in this format: “10:00”, “09:59”, “09:58”, etc etc.
I don’t know much about global time and how it works. Some advice would definitely help me out, thanks in advance!
local Start_timer = os.time()
-- when you want to update the timer do:
local function Gettimer()
return Start_timer + 10 * 60 - os.time()
end
-- Gettimer now is the remaining time in seconds,
-- but you can convert it with dividing by 60
adding the colon is a little tricky and i think there are other posts about that