OnCollision pausing the game

I am developing a 2D car game. I have added colliders and oncollision with the boundary of the road the life of the car reduces. I want to add a feature, to stop the car when it collides and then the car should be moved to a certain position and the player should be able to play again.

Please let me know

  1. how do I add script to stop the car oncollision?
  2. how do I move the car to the middle of the road while the game is being played to further start the game from that point?

Thanks in advance.

public GameObject GameOverScreen;
void OnCollisionEnter2D()
{
Time.timeScale = 0;
//this will pause the game
GameOverScreen.SetActive(true);
//make ui gameover screen where it have restart button and resume button on restart reload the level on resume just change Time.timeScale = 1; and disable the GameOverScreen :smiley:
}