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

Why does the touch function not work when the part is touched?

Asked by 8 years ago

Why does the touch function not work?

function onTouched()
    --Code
end

script.Parent.Touched:connect(onTouch)
1
Line 5 should be onTouched not onTouch Thetacah 712 — 8y

1 answer

Log in to vote
0
Answered by 8 years ago

The touch function does not work because on Line 5 you are suppose put in brackets "onTouched".

function onTouched()
    --Code
end

script.Parent.Touched:connect(onTouched) -- Here

Try and see if it works.

1
Thank you RedTunaProductions 10 — 8y
Ad

Answer this question