Extended Breakout Game

Hi,
I tried to extend the Breakout Game and it worked pretty well so far. But now I’m working on a Pause Function and it causes me headaches. I finally got a solution working, but for some reason, this works only until you loose your first life.

public void Setup ()
    {
        clonePaddle = Instantiate (paddle, transform.position, Quaternion.Euler(0f,-180f,0f)) as GameObject;
        Instantiate (bricksPrefab, transform.position, Quaternion.Euler(0f,-180f, 0f));
        GameObject ballObject = GameObject.Find ("Ball");
        ballScript = ballObject.GetComponent<Ball>();
        Cursor.visible = false;
        livesUI.SetActive (true);

So this function is called when the Player hits the Play button. It Instantiates the Paddle Prefab as a GameObject and I find a reference to it’s child the Ball.

public void Pause ()
    {
        paused = true;
        pMScript.PauseGame ();
        livesUI.SetActive (false);
        Cursor.visible = true;
        ballScript.Pause ();
    }


    public void Unpause ()
    {
        paused = false;
        livesUI.SetActive (true);
        ballScript.WakeUp ();
        Cursor.visible = false;
    }

With these functions and the reference I was able to call the two ballScript functions which are attached to a Script on the Ball prefab.

But when the Ball hits the ground the player loses a life, the paddle and his child gets destroyed and a after a short pause it gets instantiated

    public void LoseLife ()
    {
        lives--;
        livesText.text = "Lives: " + lives;
        Instantiate (deathParticles, clonePaddle.transform.position, Quaternion.identity);
        Destroy (clonePaddle);
        Invoke ("SetupPaddle", resetDelay);
        CheckGameOver ();
    }

    void SetupPaddle ()
    {
        clonePaddle = Instantiate (paddle, transform.position, Quaternion.Euler(0f,-180f,0f)) as GameObject;
   
        GameObject ballObject = GameObject.Find ("Ball");
        ballScript = ballObject.GetComponent<Ball>();

I thought it would also destroy the reference and so I made a new one. But when I hit pause after loosing a life, my paddle stands still and the ball is sill moving and I have no clue why this is happeng.
Here is the Ball Script, I hope you guys can help me out with this.

    public float ballInitialVelocity = 700f;

    public Rigidbody rb;
    private bool ballInPlay;
    private Vector3 savedVelocity;
    private Vector3 savedAngularVelocity;


    // Use this for initialization
    void Awake ()
    {
        rb = GetComponent<Rigidbody> ();

    }
   
    // Update is called once per frame
    void Update ()
    {
             if (Input.GetButtonDown ("Fire1") && ballInPlay == false && GameManager.instance.paused == false)
                {
                transform.parent = null;
                ballInPlay = true;
                rb.isKinematic = false;
                rb.AddForce (new Vector3 (ballInitialVelocity, ballInitialVelocity, 0));

                }
    }


    public void Pause ()
    {
        savedVelocity = rb.velocity;
        savedAngularVelocity = rb.angularVelocity;
        rb.isKinematic = true;
    }
    public void WakeUp ()
    {
        rb.isKinematic = false;
        rb.AddForce (savedVelocity, ForceMode.VelocityChange);
        rb.AddTorque (savedAngularVelocity, ForceMode.VelocityChange);

    }

Whenever I create a Pause menu/function/whatever I always use Time.timeScale to pause and I do not see that anywhere. Would that be easier for you? Have I been doing it wrong all this time?

I had problems using Time.timeScale for my Rigidbody and pausing and resuming isn’t the big problem, because it works initially. But when the player loses a life the paddle GameObject gets destroyed. The Ball is a child of the padde and so he is destroyed and with it the reference. And when I instantiate the new paddle and the ball the pause only works for the paddle and not for the ball. So my guess is that it has to do with the reference I create in SetupPaddle ();

Problem solved
The Ball was spawned together with the paddle, but only the paddle got destroyed when the player lost a life. So I ended up with two Balls wich confused the script and the pause function.