Position of contact on a .Touched function?

Please ensure that you follow Scripting Support category guidelines when requesting help. Your thread is relatively vague and there’s no indication that you’ve searched or attempted to resolve this problem. If you had searched and gone to the BasePart.Touched documentation, you’ll notice that no such parameter exists. You’ll have to calculate this yourself.

Worth the stretch, but have you attempted to compare the relative CFrame of the part in contact to the one that’s checking for the contact?

part.Touched:Connect(function (otherPart)
    local contactPoint = part.CFrame:ToObjectSpace(otherPart.CFrame)
    -- Do something here
end)

@DrakeNightingale Returning the other part’s position doesn’t give you a contact point and magnitude won’t give you the result you’re looking for, since that’s for equations requiring distance.

6 Likes