Ball control (pong)

I’m trying to make a pong like game & I was watching a old tutorial it’s very helpful but the video was so old things have changed from then to now basically what I’m trying to do is if the paddle is moving left or right the ball then needs to bounce in that direction of the paddle movement & if the paddle isn’t moving the ball must go straight here’s what I have but doesn’t seem to work

float ballForce = 200;
private new Rigidbody2D rigidbody2D;

void Start () 
{
    rigidbody2D = GetComponent<Ridgidbody2D>();
    float randomNumber = Random.Range(0, 2);
    if (randomNumber <= 0.5)
    {
        rigidbody2D.AddForce(new Vector(ballForce, ballForce));
    }
    else
    {
        rigidbody2D.AddForce(new Vector2(-ballForce, -ballForce));
    }
} 

void OnCollisionEnter2D(Collision2D col)
{
    Vector3 vel = rigidbody2D.velocity;
    vel.y = rigidbody2D.velocity.y / 2 + col.collider.GetComponent<Rigidbody2D>().velocity.y / 3;

    rigidbody2D.velocity = vel;
}

Ok, let’s see :

  1. Punctuations, do you know them?
  2. As far as i know, the pong game used the point of collision on the paddle to decide which angle to send back the ball at.
  3. You are changing y axis velocity only. From the Start method, i can see there is also movement on x axis, so where is your manipulations of velocity on x axis?