I'm trying to design a hitbox mechanics where the moment a player attacks the game generates an invisible part with no CanCollide. If this part is overlapping the hit area from another player (an invisible part, covering the body), the game will count that as hit. Is there any way of detecting if a part is touching another without writing a whole code of vectors and algorithms? (Sorry for my english)
COMMUNITY QUESTION
Easiest way to check if two parts are overlapping?
2 answers
I see you got your answer but you could also use magnitude that could complete a similar tasks. Magnitude gets the distance between 2 Vector3's. You could find the distance between the weapon hitbox and the enemy hitbox. I think magnitude is very helpful in a huge variety of problems so you should still read about it :) https://developer.roblox.com/en-us/articles/Magnitude
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
Thanks, but Magnitude is only useful for spherical hitboxes
Yeah I forgot about that. I guess magntiude wont work as well