Roblox Studio Tutorials/Day and night cycle

From Wikibooks, open books for an open world
Jump to navigation Jump to search

Have you ever wondered how to set the time of day? It is easy. Just go to Workspace -> Lighting, and change the property (clock time) to whatever you want (0:00 - 23:59). To make the time change in game, we just need to insert a script. Also, "_" in the script section is empty space. This is the simplest way to do it:__________________ while wait(1) do --change one to whatever speed you want. less is faster________ game.Lighting.SetMinutesAfterMidnight((+1)_________________________________end --30 is the minutes changed

Basically, press enter whenever you see "_".