if script.Parent.onPartTouched(otherPart) then print(part.Name .. " has touched") end part.Touched:Connect(onPartTouched)
I want to make an if statement on a collision code. It saying that it is unknown on the "onPartTouched" and "otherPart" it is saying that it is unknown. I don't know how to fix that. Thanks!!!
Collision is put simply: Simple What I spot that could fix this, is a function:
script.Parent.Touched:Connect(function(hit) local name = hit.Name print(name .. " has touched " .. script.Parent.Name) end)
Hope that helps, if not feel free to reply.