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

Help on timer?

Asked by 8 years ago

I was wondering how i can make a timer look like this 1:00 then this 60 for my games. I don't know how to make a timer like that but if you guys can help me that would be great!! All i know it has to deal with strings, right?

0
Fixed my script Shawnyg 4330 — 8y

1 answer

Log in to vote
0
Answered by
Shawnyg 4330 Trusted Badge of Merit Snack Break Moderation Voter Community Moderator
8 years ago

I'm not 100% sure how this works, as I saw it in a ROBLOX default place, but here you go:

currentTime = 60
local minutes = math.floor(currentTime / 60) % 60
local seconds = math.floor(currentTime) % 60
print(string.format("%d:d", minutes, seconds)) -- Will print 1:00
0
Ah its alright, I'll figure it out. Thanks! UltraUnitMode 419 — 8y
0
Din't really work. But thanks anyways. UltraUnitMode 419 — 8y
Ad

Answer this question