For Example,
I have a thing in Lighting called LIGHT
script.Parent.Touched:Connect(function()
morelight = Instance.new("ColorCorrectionEffect",game.Lighting)
morelight.Brightness = .4
morelight.Name = "LIGHT"
end)
that's what happens, but I want it to not add more than one of it otherwise it blinds the screen.
so when I put an if statement before the code like this:
script.Parent.Touched:Connect(function()
if game.Lighting.LIGHT then return end
...
end)
to check whether LIGHT already exists and not do anything it says LIGHT is not a valid member of Lighting which is pretty self-explanitory.
However, I just don't know what to do.
Firstly, I don't need debounce because it would still add more.
Secondly, I don't need Debris because I want LIGHT to stay.
if not game.Lighting:FindFirstChild("LIGHT") then --code end