I am trying to translate the position of an object from one point to second in x-axis in 2d while it is moving in y direction continuously but after moving only one time it is getting struck plsss help me
Get the current position of the transform and then just modify the X position using Lerp if you want a smooth transition and then just set the transform again.
Vector3 position = this.transform.position;
position.x = Mathf.Lerp(position.x, target.x, speed * Time.deltaTime);
this.transform.position = position;
OK I will try this thanks for the reply