What is the best alternative for .Touched but not ZonePlus or Raycast hitbox?

What is the best alternative for .Touched?

Zoneplus: it requires the part to be cancollide off, but I need a collision check for solid parts and zoneplus doesn’t work for that

Raycast hitbox / ClientCast: let’s say I have lava, i would have to make a million DmgPoint attachments to it and what if the damaging part is changing size?

1 Like

OverlapParams works well!!!

How does OverlapParams work? I have never seen that before

It works alot like raycasting except it uses the collision of a basepart instead. Another solution is using raycasts for each corner of the basepart. But overlap params are far easier to use

WorldRoot: GetPartsInPart, GetPartBoundsInBox, GetPartBoundsInRaidus, Blockcast, Spherecast
BasePart: GetTouchingParts

Using Heartbeat loops.

Does it perform well on server?

Using spacial query APIs every Heartbeat will have a performance cost compared to .Touched. As always, physics is generally more performant done on the client, and should be done wherever security is not your concern.

So .Touched is better in performance compared to OverlapParams? Why would I use OverlapParams?

Some people consider .Touched less reliable than spacial queries (being delayed or inaccurate) and spacial queries give you more customization/control