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

Why won't my end work?

Asked by 10 years ago
script.Parent:connect.Touched(onTouched)

I have the function onTouched but the end, won't work. Red lines.. Why?

1 answer

Log in to vote
1
Answered by 10 years ago

Man the errors in this are.. oh man..


script.Parent.Touched:connect(onTouched) -- ALWAYS the Event FIRST THEN connect

Oh and just in case, this is how you do this:


script.Parent.Touched:connect(function() -- Your code here end)
0
OHHHHHH, well I was close, thank you! Roboy5857 20 — 10y
Ad

Answer this question