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

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

Why does the touch function not work?

function onTouched()
	--Code
end

script.Parent.Touched:connect(onTouch)

1 comment

1

Line 5 should be onTouched not onTouch

1 answer

✓ Accepted answer

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 comment

1

Thank you

This discussion is preserved as it was. New answers, comments, and votes are closed.