Waypoints for PathFindingService not being created

You can write your topic however you want, but you need to answer these questions:
Hello, I seem to have a problem with waypoints being created and I have tried many different tutorials of pathfinding and looked at other forums. I simply do not understand why it is not being created

robloxapp-20210307-1823486.wmv (708.2 KB)

I have tried printing the locations as you can see and nothing appears in the output either

Try putting:

path:ComputeAsync()

before defining your waypoints.

Change

path = pathfind:FindPathAsync(ctorso.Position, target.Position)

into

path = pathfind:ComputeAsync(ctorso.Position, target.Position)

It says ComputeAsync is not a valid member of Pathfindingservice?

It did not print the the waypoints position still when the target been spotted

path = pathfind:CreatePath()
path:ConputeAsync(ctorso.Position, target.Position)
path = pathfind:CreatePath()
path:ComputeAsync(ctorso.Position, target.Position)
print(path.Status)

Try that and see what the print output is, maybe there is a problem with the path itself

It prints there is no path. Why could that be?

That could mean that a path could not be established between the two points. Try moving them next to each other and see what happens

Out of curiosity have you created terrain in your game? Sometimes there can be a random little chunk of terrain thousands of studs away from where you expect it to be and that will mess up the navigation mesh of the game resulting in no path being generated. In Studio, go to File->Studio Settings, scroll down to Visualization and turn on ‘Show Navigation Mesh’

There is terrain, what am I supposed to find with the navigation mesh?

I tested it out in another game and it did work, what would I do to fix the problem with terrain

I had this issue once and the only way I could fix it without deleting all the terrain and starting over was to try and find every rogue bit of terrain and delete it, tedious and frustrating but it did fix the problem.
If it’s the same issue you will probably find the navigation mesh has generated far away from the actual terrain you want it on (in my case thousands of studs below the map)

Alright thanks for the help! I may just restart terrain since its not much

1 Like