I'm getting some very strange movements from an object position

The station Gameobject teleports to the almost the center of the scene when the function is called. When it should move slowly to the right. The function is called from the startup() with a on click button listener.

I am confident it has something to do with the deltaTime. But I can’t seem to solve it.

void GoToBelt(GameObject station)  
    {

        float stationMovingSpeed= 1;
        Vector3 stationUndocked = new Vector3(-16, 3.2f, 0);
            
        float step = stationMovingSpeed * Time.deltaTime; 

        station.transform.position = Vector3.MoveTowards(transform.position, stationUndocked, step);

    }

Good day.

As i supose this script is not in the station Gameobject because you need to acces it from station.transform… You miss refear to the station inside the MoveTowards function.

Replace with :

station.transform.position = Vector3.MoveTowards(station.transform.position, stationUndocked, step);

Bye!