I cant understand the PathFindingService >=(

I tried pathfindingservice for my nextbot,it was worked but it was going to players collected position until its ended.
like the nextbot gets the current player position and targets to that position.when its completed.gets new one and continues as loop.

How do i make this chase thing because i need this for my fanmade rooms game later :man_health_worker:t6:

1 Like

I have this issue as well, but a possible solution would be using SimplePath module because your NPC doesn’t use animations, so using a while loop with that module can allow for continuous targeting

Is the issue that the NPC attempts to pathfind even if there’s a direct line of sight with the player? If that’s so, then you’ll want to check if the NPC has line of sight with its target pretty much constantly, and stop pathfinding if it does.

Pathfinding returns an array of waypoints. By the time you have cycled through each waypoint, the target has most likely moved. What you could do instead, is get it to navigate only to the first returned waypoint and then return to recalculate the next path to the target object.

tbh what I tend to do is Pathfinding to a certain distance to the target (20 -30 studs) and then change mode to use short MoveTo(CFrame) commands to navigate closer to the target in a while loop.

There are plenty of exmaples out there on DevForum that do similar things.