Answered by
5 years ago Edited 5 years ago
I recommend using GetTouchingParts, using Magnitude has more math in it, GetTouchingParts is simpler and easier, magnitude takes up a few extra lines...
1 | local p = workspace.Part.Position.Magnitude |
2 | local p 2 = workspace.OtherPart.Position.Magnitude |
4 | if math.abs(p-p 2 )<p-workspace.Part.Size.X then |
I am using abs because sometimes it glitches for me, It is believed that magnitudes can never be negative but I really don't know.
You didn't give code so I didn't give precise results, if this helps though, click answer. c: