# Unity - Copy another object's Y location?

I'm creating a Pong clone inside of Unity and was trying to figure how to copy another object (In this case being the Y co-od of the Ball Object) How would i go about doing this? I'm using vectors as my method of paddle movement and I want to create a public int AISpeed so that the AI paddle is a little slower in comparison

In my mind I assumed it was along the lines of: rightPaddle.location.y = pongBall.location.y

How would I create this?

Vector3 paddleOldPos = rightPaddle.transform.position;