How to move one gameobject according to move other gameobject?

In my game I am using one Ball & one Paddle…I am try to move paddle according to movement of ball in game. In paddle I am attached this script.

using UnityEngine;
using System.Collections;

public class PaddleAutoController : MonoBehaviour {
	
	public float speed=6.0f;
	Transform ball;
void Update () {   
if(GameObject.FindWithTag("ball"))
	{
		ball =GameObject.FindWithTag("ball").transform;
		if(ball.position.y > 0)
		{
			Vector3 pos = transform.position;
			pos.x = Mathf.Lerp(pos.x, ball.position.x, speed * Time.deltaTime);
			transform.position = new Vector3(Mathf.Clamp(transform.position.x, -14, 14),20,0);
		}
	}
}

But it not working…

Regards
kajal

This will work:

using UnityEngine;
using System.Collections;
 
public class PaddleAutoController : MonoBehaviour {
 
    public float speed=6.0f;
    Vector3 startPosition;
    Transform ball;

void Start()
{
    startPosition = transform.position;
}

void Update () {   
if(GameObject.FindWithTag("ball"))
    {
        ball =GameObject.FindWithTag("ball").transform;
        if(ball.position.y > 0)
        {
            Vector3 pos = transform.position;
            pos = Vector3.Lerp(pos, ball.position, speed * Time.deltaTime);
            // This will make sure the y and z remains the same
            pos.y = startPosition.y;
            pos.z = startPosition.z;

            transform.position = new Vector3(Mathf.Clamp(pos.x, -14, 14),pos.y,pos.z);
        }
    }
}