I'm a beginner in scripting and I need help. So what I wanna do is make a script that changes the fog color from white to black at a specific time. But for some reason the script isnt working. Again, I am a huge noob to coding, so theres probably a huge and obvious reason why it doesn't work that goes right over my head. Plus, I think that the repeat until loop may not be fit for this type of script, so if that is the problem, please tell me which loop would be better.
`function fogShift()
if game.Lighting:GetMinutesAfterMidnight() > 1050 then repeat game.Lighting.FogColor = Color3.new( game.Lighting.FogColor.r-1/255, game.Lighting.FogColor.g-1/255, game.Lighting.FogColor.b-1/255) wait(.1) until game.Lighting.FogColor(0,0,0)
end end`
fogShift()