Can I make a part invalid for pathfinding?

Hello all.

I am trying to use the pathfinding service but it is always using the hand rails of the stairs or ledge as the path. This causes the agent to be stuck etc and it’s not realistic for someone to walk on the rails.

I tried decreasing / increasing the rails’ width or changing agent radius. It all doesn’t work.

I am thinking of making these rails parts invalid for pathfinding but I can’t seem to find any reference for such. ( currently these are all coloured purple for navigation mesh )

Hopefully someone can be kind enough to advise me. Much appreciated.

Is there a property that I can set on the railing parts to prevent pathfinding perhaps?

I really hope not to remove all rails from my game :frowning:

Thank you so much.

As far as I am aware, there is no way to exclude parts when using the pathfinding service. That being said, you could always make a tall invisible part that collides with the NPC to prevent it from climbing on the railing parts.

Messing with the agent parameters such as turning off jumping may fix this issue for you too, but I cannot be too sure as I cannot see how the railings are built.

1 Like

Thanks for answering. Tried the jumping. It doesn’t work.

Could you kindly tell me more about the invisible colliding idea?

Ideally, it would be a part that has transparency set to 1. The part size would extend to cover all of the rails making it impossible for the NPC to walk there.

Example:

1 Like

Sorry I was editing cause I wanted to put all my questions and not trouble u too much but you ere too fast. ( thank u )

How can I make it affect NPCs only and not the players and the bullets shot by players and NPCs?

Appreciate So much

you would probably have to make your own pathfinder like a* but it sounds like with your game it shouldn’t be too hard

1 Like

You are looking for collision groups.

The DevForum has an extensive tutorial already on how to use them:

1 Like

Ok I will go read it. Thank you so much @UnderMyWheel :slight_smile:

Meaning I don’t use pathfinding? Can you kindly share a little more?

Thanks!

sure, a* is a type of pathfinding algorithm the wiki article is confusing that’s why i didn’t link it. Roblox actually uses a* for their pathfinding. In a* you place a bunch of nodes and write some code that does the pathfinding and you’re done. I used coding trains videos to create mine (its lost now sorry). but here is the first video the rest should be easy to find in the descriptions or end cards. https://www.youtube.com/watch?v=aKYlikFAV4k

1 Like

thank you so much @mattchew1010

1 Like