In your example, you can cast rays from attachments placed inside of the weapon whenever the player attacks and if the rays happen to intersect with a specific part of another player’s body (e.g, the torso) it would be able to detect that that part of the body was hit. Fortunately for you, there are a lot of resources already made that you can use to implement this easily.