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

Failure in GeographicLatitude Day/Night?

im making a script wich is a Day/Night that makes the Sun and the Moon spin around the Workspace, but... i don't see it working, what is going wrong here?

local PlanetSpin = game.Lighting.GeographicLatitude

while true do
PlanetSpin.new = "+1"
end
	
if PlanetSpin == 360 then
local PlanetSpin = 0
end

1 answer

✓ Accepted answer

This should work for you. Upvote if it did.

Spawn(func) continues the code without it pausing at loops.

spawn(function()
	while true do
		game.Lighting.GeographicLatitude = game.Lighting.GeographicLatitude + .1 -- amount
		if PlanetSpin => 360 then
			game.Lighting.GeographicLatitude = 0
		end
		wait(.1) -- speed
	end
end)

2 comments

0

You didn't putted the PlanetSpin Variable, but anyways, its really useful, Thanks!

0

And instead of using => i used == . So, doing that, it works

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