Roblox pathfinder walks through wrong pathfindinglinks

I recently fixed an issue with my Pathfinding NPC going through doors by adding pathfinding links to either side of the door, so the npc walks through them properly.

This comes with an issue:


As you can see, the npc goes through one of the doors’ pathfinding links, even though it isn’t going through the door. I really don’t want this to happen.

Is there a way to change the range of a pathfinding link or to make it only trigger if the npc is already touching it? How can i fix this?

I think you should use a pathfinding modifier instead.

The doors have CanCollide turned off for the npc (with collisiongroups). All of them have modifiers anyway and without the links, the npc gets stuck on the doorframes (completely ignoring the agentradius)