How to use delta time in my specific script?

Hello. I found a similiar question about this, but that code doenst work on my game.
Please dont ignore my question.
So, I have a object and i want make him move from point A to B, and i already do that, but, the problem is, i want make him move slowly from point A to B instead teleport. How can i do that?

Thats my actual script.

public bool xMove;
 public float speed; 
public float Nspeed;

void Start () {
 speed = 3f;
 Nspeed = -3f; 
xMove = true; }

void Update () {

  if (Input.GetMouseButtonDown (0)&& !xMove){
          transform.position = new Vector2 (transform.position.x, speed );
      xMove = true;
      if (Input.GetMouseButtonDown (0)){

  if (xMove){
      transform.position = new Vector2 (transform.position.x, Nspeed);
      xMove = false;

You need to store the desired target position, and ‘ease’ from the current one to the desired one. You can use Unity - Scripting API: Vector2.Lerp for that matter :

 //Add additionnal properties
 Vector2 targetPosition = new Vector2(); 
 float movePercent = 0;

in your Update function, you can use it as follow :

 if (xMove){
    movePercent += NSpeed;
    transform.position = Vector2.lerp(transform.position, targetPosition, movePercent);
    if(movePercent >= 1)
         //lerp is 'complete'
         //reset percent & stop movement
         movePercent = 0;
         xMove = false;

If you update your target coordinates dynamically, just set movePercent to 0 so it gets there.