Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

why wont this script work?

function  onTouch(Part)
    script.Parent.PointLight.Range = 15
wait(1)
script.Parent.PointLight.Range = 0
 end
script.Touched:connect(onTouch)

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.

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.