NPCs keep getting paths "blocked", even though there is no visible obstruction?

I am making NPCs that use pathfinding to run around a map with obstacles
The path.Blocked event keeps firing
image
In 6 seconds I got roughly 30 “Path blocked” printouts between about 10 NPCs.
The first number on each is the index of the waypoint where the issue is, the second number is the NPC’s current waypoint.

This causes the NPCs to jerk around as they follow their paths.

Any help?

(I’m using a slightly modified version of Roblox’s tutorial pathfinding system that repeats itself using a table of pre-selected destinations)

There’s a couple of things you can do to try and solve this problem

  1. Ensure that any meshes in game if there are any have precise collision rendering if they are in a navigable location

  2. When creating a path using :CreatePath there is a parameter called PathSettings which you can input the "AgentRadius" which controls the minimum space needed to path to a location
    image

  3. You can check NavigationMeshes in studio by going to File → Settings → Studio → Show Navigation Mesh

1 Like