function onTouch(Part)
script.Parent.PointLight.Range = 15
wait(1)
script.Parent.PointLight.Range = 0
end
script.Touched:connect(onTouch)
✓ ANSWER ACCEPTED
why wont this script work?
3 answers
✓ Accepted answer
You are accessing the Touched property of script.
However, Script objects have no Touched property. The output would tell you this. You should read your output because it already told you of this problem, which is practically the solution on its own.
Most likely you meant script.Parent.Touched in the final line.
You probably forgot the service , Idk
Is it just pointlight range you want to use? There is brightness as well.
This discussion is preserved as it was. New answers, comments, and votes are closed.
