What should I use to make a punching combat system?

I’ve already tried magnitude and dot product, hitboxes with touched event, and region3 and they all have problems that are seemingly impossible to fix

problem with magnitude and dot product including region3: When moving and then suddenly attacking a player, it doesnt hit the target because it seems that the magnitude and dot product and region3 are behind and it misses the target. I even made it stop the player so that when it attacks it hits the target but actually it doesnt work and when i stay still after the first hit and attack again it hits, so this is proof that magntiude dot product and region3 are behind and miss.

Touched event is so terrible to use because of how unresponsive it is, i literally stand at punching distance and it sometimes misses.

I’m wonder if RAYCASTING is going to have the same problem with magnitude, dot product and region3 where when I send a message to the server script using a remote event to start the raycast and it will be behind the player when moving and miss.

So should I use raycasting to fix all of this? or it wont work and theres actually a solution to this late hit detection?

should I just calculate the detections on the client instead? and send a message to the server to damage the target?

1 Like

I use a collision part for my uses.

I use a part in cache then span the part where I want it.
Then GetTouchingParts
Then check the player.
The good thing about this is that it is quite accurate and is easily customisable.

You said that dot product and magnitude are not working for you? Is it possible to show a code snippet or vid?

Not a good idea since it is easily(sometimes) exploitable. Even with checks.

Hey, late reply but I really really recommend the raycast module. It’s insanely accurate. Raycast Hitbox Update 3.3: For all your melee needs!

1 Like