How do I get the ball to bounce off the paddles at an angle?

I have been using a Ping Pong game tutorial. This is the C# code that I had learned and copied to get my ball to bounce off the paddles at an angle and to get the ball moving back and forth.

public float speed = 30;

void Start () {
	// Initial Velocity
	GetComponent<Rigidbody2D>().velocity = Vector2.right * speed;
}

float hitFactor(Vector2 ballPos, Vector2 racketPos, float racketHeight) {
	// ascii art:
	//		1 <- at the top of the racket
	//		
	//		0 <- at the middle of the racket
	//
	//     -1 <- at the bottom of the racket
	return (ballPos.y - racketPos.y) / racketHeight;
}
void OnCollisionEnter2D(Collision2D col) {
	// Note: 'col' holds the collision information. If the
	// Ball collided with a racket, then:
	//   col.gameObject is the racket
	//   col.transform.position is the racket's position
	//   col.collider is the racket's collider
	
	// Hit the left Racket?
	if (col.gameObject.name == "RacketLeft") {
		// Calculate hit Factor
		float y = hitFactor(transform.position,
		                    col.transform.position,
		                    col.collider.bounds.size.y);
		
		// Calculate direction, make length=1 via .normalized
		Vector2 dir = new Vector2(1, y).normalized;
		
		// Set Velocity with dir * speed
		GetComponent<Rigidbody2D>().velocity = dir * speed;
	}
	
	// Hit the right Racket?
	if (col.gameObject.name == "RacketRight") {
		// Calculate hit Factor
		float y = hitFactor(transform.position,
		                    col.transform.position,
		                    col.collider.bounds.size.y);
		
		// Calculate direction, make length=1 via .normalized
		Vector2 dir = new Vector2(-1, y).normalized;
		
		// Set Velocity with dir * speed
		GetComponent<Rigidbody2D>().velocity = dir * speed;
	}
}

However, this code does make my ball go back and forth, but does NOT make my ball go off the paddle at an angle, that is determined by where the ball hits the paddle. Can you guys help me figure this problem out, if you can it would be very appreciated. Here’s the link to the tutorial I am using on Unity 5: noobtuts - Unity 2D Pong Game

@minitoe1