How to make Angle Sanity Checks on a melee weapon?

So, with my Sword melee weapon, I am using client side hitboxes and already have a magnitude distance sanity check in place on the server.

I am just wonder how I could check if the the thing that was hit by the sword is in the set angle of the attacking player’s look direction.

Here is an image to describe what I am talking about.

1 Like

Oh to find the angle you can calculate the dot product angle between the humanoids look vector(humanoid root partlook vector) and the vector direction of the humanoids position towards the hitobject.

2 Likes