Transform.position can't be changed smoothly.

Hello UnityAnswers, I have a problem. Not sure if small or huge tho!
I have a code that allows an object to change it’s position.x when you swipe to a direction.
The problem that i have here is, I can’t make it work to go from position.x = 0 to position.x = 4 smoothly. For example, when you swipe right, “Player” instantly goes to position.x = 4. I tried the code : this.transform.position.x = 4 * Time.deltaTime * 2;
But nothing happens.
Here is my full code written in JS.

#pragma strict

var firstPressPos : Vector2;
var currentSwipe : Vector2;
var current_pos : int;
var speed : int;
var can_speed : boolean;

function Start () {
    current_pos = 2;
    speed = 3;
    speed_up();
}

function Update () {
    this.transform.position.z = this.transform.position.z + speed * Time.deltaTime * 2;


    if (Input.GetMouseButtonDown(0))
    {
        firstPressPos = Input.mousePosition;
    }
    if (Input.GetMouseButtonUp(0))
    {
        currentSwipe = Input.mousePosition - firstPressPos;

        if (currentSwipe[0] + 150 > 0)
        {   
            if(current_pos == 3){
                return;
            }if(current_pos == 2){
                this.transform.position.x = 4;
                current_pos = 3;}
            if(current_pos == 1){
                this.transform.position.x = 0;
                current_pos = 2;}
        }

        if (currentSwipe[0] + 150 < 0)
        {   
            if(current_pos == 1){
                return;
            }
            if(current_pos == 2){
                this.transform.position.x = -4;
                current_pos = 1;}
            if(current_pos == 3){
                this.transform.position.x = 0;
                current_pos = 2;}
        }
        }
    }

function speed_up(){
    for(var i = 0; i  < 10; i++){
        yield WaitForSeconds (10);
        if(speed < 21){
            speed = speed + 6 ;
            InvokeRepeating("speed_up", 0, 2);
            can_speed = false;}else{return;}
    }
}

Thanks for your time!

You could make use of Vector3.MoveTowards.

Or you could make a small dash animation that gives the illusion that the player moved with an incredible high speed.

I find the latter cooler, but it is up to you.

You can use vector3.lerp for smooth movement.

This may help you.