Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

why wont this script work?

Asked by 10 years ago
function  onTouch(Part)
    script.Parent.PointLight.Range = 15
wait(1)
script.Parent.PointLight.Range = 0
 end
script.Touched:connect(onTouch)

3 answers

Log in to vote
0
Answered by
BlueTaslem 18071 Moderation Voter Administrator Community Moderator Super Administrator
10 years ago

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.

Ad
Log in to vote
-1
Answered by 10 years ago

You probably forgot the service , Idk

Log in to vote
-1
Answered by 10 years ago

Is it just pointlight range you want to use? There is brightness as well.

Answer this question