How do I make hitboxes?

Hello! So I was thinking on how to make good hitboxes. Before I was using .Touched event but as I know it’s not very good. I was searching on forum about it but I was seeing only Raycast4V. This is better for melee weapons when in my game will be characters without melee weapons. Custom raycast will be a mess since I will need do it in all directions. Region3 will be probably same as .Touched. So how do I do that?

What do you want the hitboxes to be used for?

I want use them for a fighting combat.

So for melee weapons? asdf asdfasdf

Not only for them. In example I want make combat where will be only fists. And I don’t think RaycastV4 will be very good for that.

By raycastv4 I’m assuming u mean this: Raycast Hitbox 4.01: For all your melee needs!

I don’t understand why you would think that it would not be good for a punching melee system

1 Like

Yeah that what I was meaning. But I want try to know if there any other ways.

There will always be another way to programme something, Its just finding the most efficient way. And I think using this module would be the most efficient route. But if you want to go another way, you could use touch event on parts, when the player swings check if other players are in a certain distance, etc.

Well if there no any better way then i gonna use this module.

I think the best solution, would be to use GetPartBoundsInRadius. Because region3 is obsolete. Also it’s easier to learn!

2 Likes

In addition to the previous reply you also have GetPartsInParts() and GetTouchingParts() which could both be applied here.

1 Like

Use this: Introducing OverlapParams - New Spatial Query API

I use them and, trust me, they work like a charm. If you optimize them, they turn out to be better than any other method (for weapons I recommend Raycast Hitbox tho), considering how easily you can customize them.

2 Likes