Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

do you know how to fix my fog color night/day shifting problem?

Asked by 7 years ago

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()

0
The answer is obvious. Change line 3 to: game.Lighting.FogColor.Color3 = Color3.new( MrMinecraft998887 87 — 7y
0
It still doesn't work. BronzedMocha 60 — 7y

Answer this question