So, I have a script that changes the Outdoor Ambient depending on the time of day. When it's dark out, the ambient is 0,0,0, at dawn it has a bluish hue, etc.
The following script is almost a year old, from one of my PAs that had a Scripting Helpers account. It worked for me a year ago, IDK why it isn't working now. I changed it from FogColor to OutdoorAmbient, if that means anything.
game.Lighting.Changed:connect(function()
if game.Lighting.TimeOfDay == "00:00:00" then
game.Lighting.OutdoorAmbient = Color3.new(0,0,0)
elseif game.Lighting.TimeOfDay == "5:00:00" then
game.Lighting.OutdoorAmbient = Color3.new(13/255,60/255,131/255)
elseif game.Lighting.TimeOfDay == "7:00:00" then
game.Lighting.OutdoorAmbient = Color3.new(127/255,127/255,127/255)
end
end)
The script doesn't work though, and I'm starting my game at midnight, which should have 0,0,0 as an outdoor ambient. When I run the game, it stays at 127,127,127 as normal.
If any of you could tell me what I'm doing wrong, that would be much appreciated. :)

1 comment
Are you ever changing the TimeOfDay property? It doesn't change on its own.