- workspace:GetPartsInParts()
- workspace:Raycast()
- workspace:GetPartsBoundInBox()
- workspace:GetPartsBoundInRadius
- workspace:Blockcast()
- workspace:Shapecast()
- workspace:Spherecast()
GetPartsInPart is much more performant and is usually enough for most combat systems
i usually use Raycast, GetPartBoundInRadius, and GetPartsBoundInBox.
I’ve always used workspace:GetPartsBoundInBox and its worked perfectly fine without much lag at all, and it was the easiest to use imo.
I actually use the following in given situations:
-
workspace:GetPartsBoundInBox() is what I use for the majority of my skills.
-
workspace:GetPartsInPart() is used when I need more accurate hitDetection for non-cube-like hitboxes, like that of a sphere. I could probably swap this out with workspace:GetPartsBoundInRadius().
-
workspace:Raycast() for Projectiles (if they aren’t too big to the point of needing millions of raycasts lol) until it detects a hit, then I use :GetPartBoundsInBox to get enemies at the HitPosition.
Additionally, when a player spawns, I create a PlayerHitbox and set it’s collisionGroup to “Target”, which is a collisionGroup that only interacts with collisionGroups “Hitbox” and “Projectile” to help with performance a bit.