How could i detect if a player drove a mile?

Hello! I’ve been wondering how could i detect if a player has drove a mile with a vehicle seat?

thanks for reading :slight_smile:

You store the position the player was in. According to this post there is 0.28m in a stud. Then you look at how many meters there are in a mile, 1609 (rounded). Then you look at how many 0.28’s go into 1609 – this is about 5750 studs. Then you look at how far away the vehicles has gone (x, y, z) by comparing your original position variable to it.

Hope I helped.

3 Likes

You can instance an IntValue named x inside the player.

And then get the occupant aka the player who is sitting on the vehicle seat.

And then lastly, in roblox studs are calculated not miles so you can do it like every stud, ''x" value is increased in the intValue x.

1 Like

Thank you for your help. Now i got an idea of how i can do it.

1 Like