I know it seems confusing, but i'm trying to make it after 180 seconds it changes back to noon, can anyone help?
local minutes = 0
local hours = 0
while true do
game.Lighting.TimeOfDay = hours.."20:00:00"..minutes
--what is the changed time
wait(script.WaitToAdd.Value)
minutes = minutes + script.AddAmount.Value
if minutes >= 60 then
hours = hours + 1
minutes = 0
if hours >= 24 then
hours = 0
end
end
end
--i wanted to change it back to 12:00:00.

3 comments
The problem's line 5. :P
TimeOfDay is a string and not a number :|
You can use tostring() to turn numbers into string