About hitbox problems

Hello there! I want u guys suggest me about hitbox. here is my problem.

As I know, there are 3 way to make hitbox. Touched event ,Region3 and raycasting.
but I don’t what to use when.

first I try touch event on projectile but I found problem that when player or npc is anchored they won’t get damage and sometime it won’t detect. So I change to region3 but it can’t rotate. And for the raycating I don’t know how to use.

1 Like

Touched events are tough to use with projectiles because if the projectile lags and jumps along it’s line of travel it may not touch the target at all.

If you want to learn about Raycasting try the developer.roblox.com site. There are a few pages with information about Raycasting like Raycasting | Roblox Creator Documentation.

You can also try using the Search tool up top here to find other posts about projectiles and Raycasting.

1 Like

what about region3 and touch event when to use

1 Like

Try searching the developer.roblox.com site again for those items. There may be helpful information there.
Also try searching these forums for help on those topics too. The information you can get from those posts is probably better than what I can give.

1 Like

There is a useful module called ZonePlus. It creates dynamic zones and listens for items entering or leaving the zone.

1 Like

well, you can just get creative however I suggest you use RayCast for projectiles and mix the others on Melee stuff also don’t forget that Magnitude with Dot Product is also an option!

1 Like

Try using FastCast.
For melees, I recommend RaycastHitbox.
For regions, I suggest using ZonePlus or Roblox’s GetPartsInPart feature.

2 Likes