I have this code here that changes the fog color with the time of day, but it is not working the way it should.
It turns black correctly, but the fog doesn't turn blue.
`function onLightingChanged()
if game.Lighting.TimeOfDay == "6:00:00" then game.Lighting.FogColor = Color3.new(180/255, 255/255, 234/255) --Day end if game.Lighting.TimeOfDay == "18:00:00" then game.Lighting.FogColor = Color3.new(0/255, 0/255, 0/255) --Night end
end`
local Lighting = game:GetService("Lighting")
Lighting.LightingChanged:connect(onLightingChanged)