I need help with my racing game

I need help with making a system that doesn’t let the player go backwards on the race track that you are put on when you press “B” here is my project:

:racing_car: