smooth Camera Follow On Y Axis Only !!Please HELP!!

Hi, I was wondering a way I can get my camera to only be able to go up Smooth on the y axis and not on the x-axis. This is for a mobile doodle jump like game. Here is the code I’m using.

public class camerafollow : MonoBehaviour
{
    public float dampTime = 0.15f;
    public Vector3 offeset;
    private Vector3 velocity = Vector3.zero;
    public Transform target;
private void FixedUpdate()
    {
        Vector3 mpos = target.position + offeset;
        transform.position = Vector3.SmoothDamp(transform.position, mpos, ref velocity, dampTime);
    }

Try this:

    void Update()
    {
        Vector3 targetPosition = target.position + offeset;
        Vector3 smoothedPosition = Vector3.MoveTowards(transform.position, targetPosition, smoothSpeed * Time.deltaTime);
        smoothedPosition.x = targetPosition.x;
        transform.position = smoothedPosition;
    }