This isn’t all too informative - in what way doesn’t it detect correctly? What were you expecting, vs. what you’re seeing?
To answer the question posed in the title, however, I recommend raycasting; .Touched events are often delayed and sometimes don’t fire at all. Pre-made modules for melee raycasting exist, like this one:
If you wish to perform the raycast client-side to give faster hit feedback, just be sure to also perform a sanity check on the server.
Well, it should detect a ray in FRONT of HumanoidRootpart, it works, but sometimes, it just doesn’t makes it well or doesn’t detects when I’m in front.