Change Transforms not working

Okay, I have made a script that has public functions tied to an event to move and rotate an 3D object from one position and rotation to another. However, when I try to activate it via an event, nothing happens. Here’s my code:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class ChangeTransforms : MonoBehaviour
{
    //holds the object's starting position
    [SerializeField]
    private Transform sPos;
    //holds the object's finishing position
    [SerializeField]
    private Transform fPos;
    //holds the object's move speed
    [SerializeField]
    private float speed;
    //holds the object's rotation speed
    [SerializeField]
    private float rotationSpeed;

    //sets the position and rotation to the start upon starting
    private void Awake()
    {
        this.transform.SetPositionAndRotation(sPos.position, sPos.rotation);
    }

    //goes from starting position to finishing position
    public void GoToFinish()
    {
        var step = speed * Time.deltaTime;
        var rotStep = rotationSpeed * Time.deltaTime;
        this.transform.position = Vector3.MoveTowards(this.transform.position, fPos.position, step);
        this.transform.rotation = Quaternion.RotateTowards(this.transform.rotation, fPos.rotation, rotStep);
        //checks if the position of the object and its destination are approximately equal
        if(Vector3.Distance(this.transform.position, fPos.position) < 0.001f)
        {
            this.transform.position = fPos.position;
        }
    }

    //goes from finishing position to starting position
    public void GoToStart()
    {
        var step = speed * Time.deltaTime;
        var rotStep = rotationSpeed * Time.deltaTime;
        this.transform.position = Vector3.MoveTowards(this.transform.position, sPos.position, step);
        this.transform.rotation = Quaternion.RotateTowards(this.transform.rotation, sPos.rotation, rotStep);
        //checks if the position of the object and its destination are approximately equal
        if (Vector3.Distance(this.transform.position, sPos.position) < 0.001f)
        {
            this.transform.position = sPos.position;
        }
    }
}

What could I be doing wrong? At what line is everything falling apart?

Hi,
Where’s your Update method that calls these methods?

You said

when I try to activate it via an event

It’s not really clear what that means. Your methods use Time.deltaTime. So they need to be called every frame in order to work properly. So do you raise your event every frame? Have you added a Debug.Log call to your methods to see if they get executed? If they are only executed once, the amount your object would move would be tiny.

So I guess you have a conceptional issue here.