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

Making Moon and Stars show at night?

This is what I got so far but it's not working:

local lighting = game:service'Lighting'
local sky = Instance.new("Sky", lighting)

while wait() do
    if lighting.TimeOfDay == "00:00:00" then
        sky.CelestialBodiesShown = true
    end
end

1 answer

local lighting=game:GetService("Lighting")

lighting.Changed:connect(function(property)
	if property=="TimeOfDay" then
		local value=lighting[property]
		if value=="00:00:00" then
			local sky=Instance.new("Sky",lighting)
			sky.CelestialBodiesShown=true
			sky.StarCount=3000
		end
	end
end)

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