Why was it not possible to perform a simple addition with Ambient property with this one line script?

– (Script)

game.Lighting.OutdoorAmbient = game.Lighting.OutdoorAmbient + Color3.new(0.1,0.1,0.1)

Unfortunately Color3’s are one of few classes that don’t support addition.

But, you can use this alternative:

local base_color = game.Lighting.OutdoorAmbient
game.Lighting.OutdoorAmbient = Color3.new((base_color.r/255) + .1, (base_color.g/255) + .1, (base_color.b/255) + .1)

Should work.

1 Like