Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Time in game?

I made a gui where it shows the time in game I just need to know what to put next in the script im at the point where it says "Current Time".. ? I just need to know what to put in the ? so I can find the time?

1 answer

✓ Accepted answer

These are examples of getting time from kohls admin, maybe it can help you. game.Lighting.TimeOfDay

function GetTime()
local hour = math.floor((tick()%86400)/60/60) local min = math.floor(((tick()%86400)/60/60-hour)*60)
if min < 10 then min = "0"..min end
return hour..":"..min
end

This discussion is preserved as it was. New answers, comments, and votes are closed.