Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to perform day/night cycle?

Okay, I want the day/night cycle to be performed in my game, so here is the script I made.

local.display(skybox)
	skybox = ("66944469")
		wait(600) -- 600 seconds = 10 minutes.
	skybox = ("123072184")
		while true do
			local function(repeat)
	end	 -- Ends the rotate script.
		end) -- Ends the Repeat

I honestly tried my best, but I couldn't figure it out. Thank you for your help guys!

1 comment

0

Please learn how to ACTUALLY script before you attempt this.

3 answers

✓ Accepted answer

It's simpler than you think, my friend!

local x = 0.1 -- The speed

while wait(x) do 
	game.Lighting.TimeOfDay = game.Lighting.TimeOfDay .. 1 
end

while wait(1.0) do game.Lighting:SetMinutesAfterMidnight(game.Lighting:GetMinutesAfterMidnight()+1); end <-- simple way! Works.

Roblox Wiki made an article on this, reading the rest may help as well

This discussion is preserved as it was. New answers, comments, and votes are closed.