PathFindingService not taking shortest Path as intended

I’m trying to make a chasing AI system for my horror game with the help of a service called Forbidden API. (Link: https://create.roblox.com/store/asset/11229474803/Forbidden-API-OFFICIAL?externalSource=www)

I’m unsure if this is an issue with the API or PathFindingService but sometimes when an enemy chases me, it Computes a path that would really take longer than it would if it were to chose the closer option. I’ve tried everything from changing the AgentRadius of the enemy, to changing where the position of the target destination is (from the HumanoidRootPart to the bottom of the model), and even changing the AgentHeight and got no results. It’s important to note I also have it marked so the Agent can’t jump.

I won’t be able to share script coding since the code is essentially the API’s, and also I’m unsure if the issue lies with the API or the PathFindingService itself.

Any help I can get would be greatly appreciated.

Video Demonstration:

1 Like

Roblox built-in pathfinding has a lot of bugs and issues, which i hope they will fix it. Try another type of pathfinding like A-star

1 Like

I agree with @BlueDeveloper24 here. When I started work on my game I spent over a month trying to get roblox’s pathfinding to work with my systems. I ended up scrapping everything I worked on and wrote an A* algorithm that can calculate a path pretty much instantly each tick and gives more accurate pathing results.

I tried looking up videos on what A* Pathfinding is about and all im getting is example videos with no explanation or code examples. Is there a good video where i can learn how to implement A* Pathfinding?

I’d recommend this video - it helped me a lot with the idea behind it.

Does giving it the ability to jump fix it? What if you manually add a PathfindingLink between (what I assume is) the carpet and wooden floor? Is there anything above the camera? Does anything look weird when you turn on the Show Navigation Mesh option in Studio Settings>Studio?