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.

4 comments
Didn't mention but I already tried that and it says the same thing
sorry i didnt put the findfirstchild i didnt know it makes a difference till now
Well, yeah either WaitForChild or FindFirstChild could prevent your error.
thanks waitforchild would have been the obvious one lol