Hey, I have this script that toggles a color correction effect on/off via a gui however when toggled the whole server's lighting changes - so if one player toggles it off, it is also toggled off for another player but I'd like it to be turned on/off locally so the lighting is local so players can choose whether they want the effect on/off.
local Button = script.Parent local lighting = game:GetService("Lighting") function onClick() lighting.ColorCorrection.Enabled = not lighting.ColorCorrection.Enabled end Button.MouseButton1Click:connect(onClick)
I think the best way to do this is to make the ColorCorrection on the spot. Just Instance.new
the ColorCorrection. I am not sure if it's gonna work though.
Place ColorCorrection in the Players camera.
local Button = script.Parent local LocalCamera = workspace.CurrentCamera local ColorCorrectionObject = LocalCamera:FindFirstChild("ColorCorrection") if not ColorCorrectionObject then ColorCorrectionObject = Instance.new('ColorCorrectionEffect') ColorCorrectionObject.Brightness = 1 ColorCorrectionObject.Parent = LocalCamera end Button.MouseButton1Click:Connect(function() ColorCorrectionObject.Enabled = not ColorCorrectionObject.Enabled end)