finger follow in one axis

Hello All,

Nooby. Ive spent a day or two looking for an answer, so i thought to come here to ask for help.

I need to find a way to lock a sprite following a finger touch along the X axis only.

Vector3 touchPosition = Camera.main.ScreenToWorldPoint(new Vector3(touch.position.x, touch.position.y, 10));
   
transform.position = Vector3.Lerp(transform.position, touchPosition, Time.deltaTime);

i have the above codewhich works well, but it follows in both x and y. i need only x axis.

Any help will be greatly appreciated.

Vector3 touchPosition = Camera.main.ScreenToWorldPoint(new Vector3(touch.position.x, touch.position.y, 10));

Vector3 target = transform. position;  // Your target is the current position
target.x = touchPosition.x;        // Your target is moved to the x position of the touch
transform.position = Vector3.Lerp(transform.position, target, Time.deltaTime);