Skip to content

Instantly share code, notes, and snippets.

@RyanLua
Last active January 31, 2025 09:24
Show Gist options
  • Save RyanLua/ff392dec6e4cd6e2c8bd135a567f21ee to your computer and use it in GitHub Desktop.
Save RyanLua/ff392dec6e4cd6e2c8bd135a567f21ee to your computer and use it in GitHub Desktop.
Script for a time cycle on Roblox using an infinite loop and compound assignment operators. Place this in a Script under ServerScriptService.
local Lighting = game:GetService("Lighting")
local SECOND_DURATION = 0.001
while true do
Lighting.ClockTime += 1/360
task.wait(SECOND_DURATION)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment