Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do I toggle local lighting with a gui?

Hey, I was wondering how I'd make a gui that would toggle local lighting (ColorCorrection) on and off (e.g. a greyscale effect that can be turned on and off via gui). Something similar to the script below? Any help would be great! :)

local lighting = game:GetService("Lighting")

script.Parent.MouseButton1Click:Connect(function()
    lighting.ColorCorrection.TintColor = Color3.fromRGB(255,255,255)
end

1 answer

ColorCorrection extends from PostEffect and PostEffect has a property called Enabled. You can simply toggle that on and off using:

lighting.ColorCorrection.Enabled = not lighting.ColorCorrection.Enabled

This discussion is preserved as it was. New answers, comments, and votes are closed.