I need a person who can fix 2 bugs in the mechanics of my game. I am a beginner in development, and I cannot find and solve the problem myself. The game is simple, a 3D endless runner, and the scripts are also quite simple; I wrote them with the help of ChatGPT. Everything is structured.
So:
1. First bug: When the player clicks the restart button in the death menu, the first click only moves the player to the coordinates of the last checkpoint, but the death menu does not close and the game does not start; on the second click, the game starts. This does not happen all the time; sometimes after the first click, the game starts from the checkpoint. So it happens every other time.
I need to remove this double click and make it so that the game always starts from the last checkpoint IMMEDIATELY after the player's first click on the restart button.
2. Second bug : When the player clicks the restart button and still continues the game from the last checkpoint, sometimes they cannot move left or right for a few seconds; sometimes they can immediately. Swipes start working if you quickly move left and right several times, and only then the control returns to normal.
I need to ensure that immediately after loading the checkpoint, the player can always move left and right without any control delays.
I have uploaded a screen video. I will send the scripts that need to be fixed. P.S. I apologize for the poor sound.