Pong tutorial difficuty

I’ve tried this tutorial multiple times and I can’t see to see what I’m missing. Here is a link to my attempt to write the Pong code. You can possibly catch my error by viewing the code:
( ball.cs )

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Ball : MonoBehaviour {

    public float ballVelocity = 3000;

    Rigidbody rb;
    bool isPlay;
    int randInt;

    // Use this for initialization
    void Awake () 
    {
        rb = gameObject.GetComponent<Rigidbody>();
        randInt = Random.Range(1,3); 
    }
   
    // Update is called once per frame
    void Update ()
    {
        if (Input.GetMouseButton (0) == true && isPlay == false) 
        {
            transform.parent = null;
            isPlay = true;
            rb.isKinematic = false;
            if (randInt == 1) 
            {
                rb.AddForce(new Vector3(ballVelocity,ballVelocity,0));
            }
            if (randInt == 2) 
            {
                rb.AddForce(new Vector3(-ballVelocity,-ballVelocity,0));
            }
        }
    }
}

… and (paddle.cs) …

using UnityEngine;
using System.Collections;

public class Paddle : MonoBehaviour 
{

    public float paddleSpeed = 1F;
    public Vector3 playerPos = new Vector3(0,0,0);
   

    void Update ()
    {
        float yPos = gameObject.transform.position.y + (Input.GetAxis("Vertical") * paddleSpeed)/2;   
        playerPos = new Vector3 (-20,Mathf.Clamp(yPos,-14,14),0);
        gameObject.transform.position = playerPos;
    }

}

Can anyone catch my error?

Hi, do you get an error message? If so what does it say?
After a quick look you might just need to initialise your bool isPlay correctly. Just put “= false” or “= true” after it, use whichever you want the initial state to be.

You could post a link to the tutorial. Also say what the problem is, you get an error? What exactly is not working? (what is supposed to happen and what is happening)

Just looking at the code, probably “Input.GetMouseButton (0)” should be “Input.GetMouseButtonDown(0)”.