What are good methods for hitbox detection?

I want to be able to punch someone upside the head and send them flying with perfect aim. What other methods are there to detect hitboxes than raycasting (crazy math), and magnitude (bleh)?

You could try using Region3 detection

If you want to do like 0 math then you can use the .Touched event but that’s not very reliable

2 Likes

Using Region3 is quite nice and accurate. I recommend using Egomoose’s module so you don’t have to do a ton of math.

1 Like

I’ll give that a try zac, thanks!

1 Like

Mind giving a source for .Touched not being reliable?

There are plenty other cases of touched not working properly :man_shrugging:t2:

1 Like

Yeah touched is super weird I tried using that to test hitbox and when standing still it’s some garbage.

2 Likes

Personally I like to use DistanceFromCharacter lol, just set the radius super low to detect a collision

Raycasting shouldn’t involve a lot of math, pretty sure Roblox handles all that for you. You just need to specify a starting position and a direction to cast a ray.
@TeamSwordphin described an interesting hit detection system a few threads ago: How to make a perfect hitbox? - #6 by TeamSwordphin

1 Like