Trying to use Pathfinding to determine a Delivery Timer

I’m trying to brainstorm a way to use Pathfinding nodes to get a fair timer for a taxi delivering game, but I have no idea how I could get a number from it.

The current system (the outdated version) just gets the magnitude from the rootpart and location’s positions and divides that by 50 to get a “reasonable timer”. However, that current system doesn’t compensate for elevations and shortcuts, so I needed to replace that method with Pathfinding nodes.

However, I can’t figure out how to get a number from it. Any ideas?

Dont you think it would it just be easier to build on the outdated one rather than start from scratch on something you havent done before?

Also for getting the nodes, when using pathfinding there are a set amount of nodes/waypoints from the starting point and the ending position so maybe that could be of use?

Actually I am trying to build on the outdated one, but the problem I’m having is I can’t figure out a way to get a number out of those nodes.

Here’s the line of code from the “outdated” version:
math.ceil((root.Position-driveto.Value.Position).Magnitude/50)

So how would I get a number from those nodes that could help me increase or decrease the timer based on where the node’s going?

So you basically want every single waypoint from the root position to the driveto position?

yep, that’s pretty much what i’m searching for

Yeah I think actually using pathfinding would be actually great for this situation because you can loop through all the waypoints

image

Sum the distance between each node and it’s next, then divide by traveling speed to get travel time.