This is the script.
local Time = game.Lighting.TimeOfDay local x = 1 while true do Time = Time + 1 wait(x) end
Time = Time + 1 -- Do notice that Time is a String Value
So therefore it wouldn't work try
game.Lighting.TimeOfDay = "14:00:00"
Notice that the Time of the day is "14:00:00" Therefore proving it's a string value" But you can use this method
GetMinutesAfterMidnight (Method) to cook up your own algorithm to create a Day and Night script.
If you're trying to get a day/night cycle script, here you are. If you're new to scripting, I wouldn't choose to script something like that first.
It would make sence on lua.org but roblox is kidna different like a mixture of c++.