Making pathfinding only availbile in map nodes

i wanna make pathfinding possible without making the NPC just make its own way, basically i want it to like select one part that it finds relatively perfect for pathfinding, such as the green map nodes you see here in the picture below this text.

RobloxScreenShot20221025_161846260

anyways how to make pathfinding only on map nodes?

Easiest way would be to use A*. You’ll need to mark up somehow which nodes are adjacent.

1 Like

You would need to use your own algorithm for this. As stated above, most of the people find the A* pathfinding algorithm the best. Here’s a game that contains a few of those algorithms. You can play around and as well, get the source code of the game

I’m not smart enough to know how to make A* pathfinding in own scripts, im not that into modules, any alternatives?