โ† Back to all scripts

Day/Night Cycle

Smooth looping day/night cycle with configurable speed and start time.

SystemsBeginnerServerScriptService
day-night-cycle.lua
-- Day/Night Cycle
local Lighting   = game:GetService("Lighting")
local CYCLE_TIME = 600
local TICK       = 0.1
local clock      = 8

while true do
    task.wait(TICK)
    clock = clock + (24 / CYCLE_TIME) * TICK
    if clock >= 24 then clock = 0 end
    Lighting.ClockTime = clock
end
Related scripts in Systems
Basic Round SystemIntermediate โ†’Checkpoint SystemBeginner โ†’Teleport to PlaceBeginner โ†’
Something broken or not working?
๐Ÿ”ง Try the AI Script Fixer โ†’