[August- 2nd week tip],
The hitbox system is a feature that allows you to set up hit detection for different parts of a character’s body.
How to use?
You can enable hitbox options by setting the HitboxType of the Workspace to SixBody or FittedSixBody.
Hitbox Types
- SixBody: Creates a fixed hitbox on the major body parts (head, torso, arms, and legs).
- FittedSixBody: Creates six hitboxes that are adjusted to the character’s appearance and clothing.
Using Collision Groups with Hitbox Options
For physics detection, the system provides four Collision Groups:
- Default : The default group for most normal Part and MeshPart objects.
- RootPart : A group exclusively for a character’s HumanoidRootPart (activated when using SixBody or FittedSixBody).
- BodyPart : A group for body parts (arms, legs, torso) (activated when using SixBody or FittedSixBody).
- Projectile : A group exclusively for projectiles that are meant to collide with a BodyPart (activated when using SixBody or FittedSixBody).
How to use?? x2
- Use a Raycast to detect a specific body part.
- Use a Touched event to detect which body part a physical collision has occurred with.