Would it be possible to create a map finding system

The question is in the title, how to make the system to find the best shortest route in a place of hundreds of roads

Like if you have this
image
How do I make a script in Roblox, to find the best shortest route within two destinations

Pathfinding service is limited to some studs, and cannot do large distance calculations

I would like how to achieve this for making an autopilot

A* algorithm maybe. A* search algorithm - Wikipedia

Or could you just make some large-scale waypoints and use pathfinding in between those, to split the route into big steps and small steps?

It seems your map is very connected so you may not have to worry about dead ends, just avoiding obstacles.

1 Like

No no, like most of the map is connected, but a few roads may also be dead-ends

And the auto pilot should go on a lane properly without hitting any other vehicle/player or building, path finding is an expensive idea for this?

The people city cars demo that Roblox made has a NPC driving function. I am not sure how it works, but you could try to take a look.

Other people’s code can be hard to grasp though, and it’s an old demo by now.