Lighting script not working as it should

i have this issue with my script where the screen turns completely white (full brightness) when i change the settings for lighting. i used a normal script and the first block of script is normal but when it turns back to default lighting it turns the whole workspace white. any help would be appreciated

function kaboom()
	game.Lighting.Ambient = Color3.new(255, 0, 0)
	game.Lighting.Brightness = 3
	game.Lighting.OutdoorAmbient = Color3.new(255, 0, 0)
	game.Lighting.ExposureCompensation = 5
end

function resetlighting()
	game.Lighting.Ambient = Color3.new(138, 138, 138)
	game.Lighting.Brightness = 2
	game.Lighting.OutdoorAmbient = Color3.new(128, 128, 128)
	game.Lighting.ExposureCompensation = 0
end

----

kaboom()

wait(5)

resetlighting()

i changed the brightness to what it normally is and it’s not bright whatsoever, so i dont really know whats happening lol

you should try Color3.fromRGB() as it’s Red, Blue, Green Color3.new applys a new color to the current color ranging from Black and White.

3 Likes

worked, thank you very much! cheers :slight_smile: