I have this fog changing coloring script, but for some reason it won't work.
while wait() do
if game.Lighting.TimeOfDay == "06:00:00" then
script.Parent.FogColor = Color3.new(158,186,250)
else if game.Lighting.TimeOfDay == "19:00:00" then
script.Parent.FogColor = Color3.new(57,57,57)
end
end
end
I assume that my day/night script is interfering with this script, but my lamp script I made works perfectly fine unlike this one.
-- Turning On and off script
Light = script.Parent.PointLight
while wait() do
if game.Lighting.TimeOfDay == "19:00:00" then
Light.Enabled = true
script.Parent.Material = "Neon"
else if game.Lighting.TimeOfDay == "06:00:00" then
Light.Enabled = false
script.Parent.Material = "DiamondPlate"
end
end
end
Any clue on how to get this Fog color change to work?
Here's the day/night script if needed:
l = game:service("Lighting")
while true do
l:SetMinutesAfterMidnight(l:GetMinutesAfterMidnight()+0.1)
wait(.1)
end

2 comments
Put a print statement after the if statements in the first script and see if it prints, indicating it got past the if statements..
It didn't go through at all. The script isn't disabled either.