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)
Nvm just found this
https://developer.roblox.com/en-us/api-reference/function/BasePart/GetTouchingParts
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