Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why is this Pathfinding script returning ClosestNoPath? [Solved]

Asked by
BlackJPI 2658 Snack Break Moderation Voter Community Moderator
10 years ago

What I wrote was literally the bare bones minimum to generate a path using the new PathfindingService.

path = game:GetService('PathfindingService'):ComputeRawPathAsync(game.Workspace.Start.Position, game.Workspace.Finish.Position, 200)
print(path.Status)

The output always says: Enum.PathStatus.ClosestNoPath

I tried the scripts on the wiki, they didn't work. I tried the howto video on Youtube, that didn't help. What in the world is going on? Is it just me having this error?

(Yes, the start and finish arguments are objects in workspace)

Edit I discovered it just wasn't working on one place. Creating a new one did the trick.

0
Maybe try extending the range from 200 to a higher number, or it might just be impossible for the script to find a actual path. M39a9am3R 3210 — 10y
0
I'm not sure what the problem was, but it only didn't work on the one place. Weird. BlackJPI 2658 — 10y

Answer this question