Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How do i make a timer with ":" thing?

Asked by
PWNTART 33
8 years ago

I know how to make one with repeat or wait but it only shows it in seconds.What function or whatever can i use to make a timer like on a digital clock or if there is anything on the wiki could I have a link to it?

0
Are you trying to use real time data? rollercoaster57 65 — 8y

1 answer

Log in to vote
0
Answered by 8 years ago

use a gui and set the text property,

t=75--or whatever in seconds

while t>0 do
t=t-wait(1) --in exact time
local s=math.floor(t%60) --set second count to the floor of the remainder of t/60 seconds
local m=math.floor(t/60) --set minutes to the floor of t/60 seconds
if s<10 then s="0"..s end --add a zero if s<9 so 1:9 becomes 1:09
    script.Parent.Text= m .. ":" .. s --change to wherever your output is
end
Ad

Answer this question