function fade()
local lights = script.Parent:GetChildren("SpotLight")
for x = 27, 0, -3 do
for i = 1, #lights do
lights[i].Range = x
end
end
end
script.Parent.Part.ClickDetector.MouseClick:connect(fade)
COMMUNITY QUESTION
Can someone help me fix this lighting fade script? I'm trying to make a spotlight's range fade to 0.
0 answers
No public answers were preserved for this question.
This discussion is preserved as it was. New answers, comments, and votes are closed.

3 comments
What doesn't work about it? Is there an error printed?
No error, I just can't get the outcome I want from it. (just won't work)
maybe its the lighting system not updating correctly