I do not understand this function. I have tried multiple things.
An example of what I have attempted would be:
function OnTouch
script.Parent.Part:Touched(OnTouch)
Which did not work. Could someone explain what I did wrong and explain the code to me?
You are missing what the function is supposed to do.
function OnTouch() --now the function has a meaning and will work print("Works!") end script.Parent.Part.Touched:connect(OnTouch)
on line five you said script.Parent.Part:Touched(OnTouch)
you dont do Part:Touched
you do
Part.Touched
you move the ":" behind the event and add "connect" like this Part.Touched:connect