local Lighting = Game:GetService('Lighting')
local function GetTime()
local timeFormat = "%.2d:%.2d:%.2d" -- Right here this thing
local t = tick()
return timeFormat:format(math.floor((t/3600)%24), math.floor((t/60)%60), math.floor((t%60)))
end
while true do
Lighting.TimeOfDay = GetTime();
wait(1)
end
COMMUNITY QUESTION
what does the '%' in a string do for time??
0 answers
No public answers were preserved for this question.
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
It's for string patterns, like %d, which represents a single digit, %s a single whitespace, etc
Read all about it here: https://developer.roblox.com/articles/Format-String