Can I prevent humanoids from climbing w/ pathfindingservice?

Right now my NPCs are climbing things they shouldn’t be to get places and I don’t want them to climb at all. Can I disable the ability for them to climb with pathfinding?


Disabling climb or jump for the humanoid (first link) or turning off AgentCanJump (second link) would be the first things I’d look at. I don’t see anything specifically related to climbing in the pathfinding docs, just jumping.

Then they just walk into walls. :frowning: Frustrating.

hmm. That’s a drag. How tall are the objects? I read somewhere that pathfinding voxelizes the world in something similar to what’s done with terrain. If the objects are smaller than 4 studs (or whatever the threshold is) then they may not be seen as obstacles. Might also be possible to create hidden geometry in places that shares a collision group with only NPCs to fine tune some of that. Are you sure they are climbing and not jumping onto and over things?

I added invisible geometry. The NPCs are client-sided so the other option didn’t work, but more geometry helped.

1 Like

Looks like obstacles with a height <= 6 don’t register as obstacles and don’t trigger the blocking. The NPC just walks up to it and stands there. Over 6 and it plots a path around it.

Setting that AgentCanJump parameter in CreatePath to false works in my test for anything taller than 1.

local path = PathfindingService:CreatePath({AgentRadius=2,AgentHeigh=5,AgentCanJump=false})

It was climbing on shelves so the height was irrelevant. It knew it could climb them or something.

Your first solution worked in my case though :slight_smile: