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

If, then situation with script. How do I fix this?

Asked by
y86v 0
4 years ago

I made a script that if the clock time is at 17.7 in the game. The ambient changes to 176. However, there is an underlined error at: game.Lighting.Ambient. When I join it, the script won't work. I need help.

if game.Lighting.ClockTime == 17.7
then
    game.Lighting.Ambient == 176, 176, 176
end

1 answer

Log in to vote
0
Answered by 4 years ago

Hi, you cannot just put numbers out of nowhere. You need to define what 176, 176, 176 is. In this case, it is the color of the ambient. So here is the correct script:

if game.Lighting.ClockTime == 17.7 then
    game.Lighting.Ambient = Color3.fromRGB(176, 176, 176)
end
Ad

Answer this question