I'm making a racing game and one of the only challenges remaining is how to figure out who is in first, second, third, etc. I want it to be able to update as the race is in progress.
Know what? I thought about that last night. IDK why, I don't even need it :D There are a few ways to do it, the easiest one is putting checkpoints. Visible or not, checkpoints must be at each corner to make script get it straighter. If person A passed checkpoint 6 and person B passed checkpoint 7, person B is closer to finish and should be 1st. If both of them are in same checkpoint and if person A is closer than person B to next checkpoint, person A should be 1st. (You can use Vector3.magnitude to calculate length between two points. If you need an example, send a comment.)
Second option is Pathfinding service of Roblox, easy for an intermediate scripter, but can create mistakes easily. If ways are clear enough for roblox players too, you can use Pathfinding but have to put at least one checkpoint to make sure pathfinding does not show back. Also Pathfinding service can only calculate shorter than 500 studs, and its pretty short for a car race. For short, I do not suggest it.
Note for viewers: I do not know if there are another ways to do this, so please do not rage on me, just put your thoughts on comments.