How to make a car checkpoint spawn system like GTA 5?

I’ve been struggling to make this system for so long now and I didn’t get it work properly. What I want to achieve is when you hit the reset button, the car will reset back to spawn. However it’s very difficult for me to make it with the script and none of the tutorial would cover that topic. If any of you know how to make one, please tell me how it’s done in a script? Thank you!

You could probably have some transparent parts along the race rack and based on the last checkpoint that they’ve touched, it’s where the reset button would move the car back to.