Brightness Script


My goal is to make a button that can be pressed which will make the brightness of the game -0.7

How would I accomplish this using a script?

game:GetService("Lighting").Brightness = -0.7 will do it.

If you are referring to Gamma, you can Modify it using Lighting.ExposureConpensation or ColorCorrection.Brightness, Lighting.Brightness just changes the Brightness of the Lighting, not the game.

Or, you can just have a Frame Obscure the Screen.


Not sure anything is wrong with this unless they are referring to something other than the property literally called brightness. Despite working differently from the brightness of ColorCorrection, they are fairly similar and either could suffice.

Make sure to place this LocalScript inside a TextButton in your game’s hierarchy. When the TextButton is clicked, the game’s brightness should change to -0.7.

-- Define the TextButton
local button = script.Parent

-- When the button is clicked, change the game's Lighting/Brightness to -0.7
    game:GetService("Lighting").Brightness = -0.7