Need help making an NPC attack someone while pathfinding

If someone could check it out, it would be appreciated.

The pathfinding is working fine, but when he should attack he stops instead

https://www.roblox.com/library/9554612221/NPC-Murderer

1 Like

Did you try considering to use magnitude?

1 Like

I did…

You haven’t even checked what’s wrong mate

What you could do is -

Check when a player is within the range, and if he is, disable the npc pathfinding and make the npc go towards the player. If the player died/ not in the range, enable the npc pathfinding.

This is one of the ways I can think of.