So I was making a game and the time was Military time and I want to it to be normal time and I don't want to use free models the code was this:
local ClockTime = game.Lighting.ClockTime game.Lighting.ClockTime = 9 local minutesAfterMidnight = 540 while true do game.Lighting:SetMinutesAfterMidnight(minutesAfterMidnight) minutesAfterMidnight = minutesAfterMidnight + 15 wait(15) end if ClockTime == 13 then ClockTime = 1 if not ClockTime == 13 then do ClockTime = 9 end end
I had a script that was working for 24h system
wait(0.5) local speed = 2.184 local hour = 20 local second = 0 local minute = 0 for i = 1, math.huge do for i = 0, 59 do minute = i game.Lighting.TimeOfDay = hour ..":"..i..":".. second wait(0) for g = 0, 59/speed do game.Lighting.TimeOfDay = hour ..":"..minute..":".. g*speed wait(0) end end if Hour >= 11 then print(hour.." AM") else print(hour.." PM") end hour = hour + 1 wait() end