player won't go back to a transform after loading

As the title says, after hitting the load button, the player won’t go back to the transform variables i have set. Yet all my other variables loading in work fine. (using a binary formatter)

here’s the code:

a piece of my save and load script.

    public void SavePlayerData()
    {
        SaveSystem.SavePlayer(this);
        Debug.Log("Saved Game");
    }

    public void LoadPlayerData()
    {
        PlayerData data = SaveSystem.LoadPlayer();

        Vector3 loadedPosition;
        loadedPosition.x = data.playerTransform[0];
        Debug.Log(loadedPosition.x + " x position loaded");
        loadedPosition.y = data.playerTransform[1];
        Debug.Log(loadedPosition.y + " y position loaded");
        loadedPosition.z = data.playerTransform[2];
        Debug.Log(loadedPosition.z + " z position loaded");


        transform.position = loadedPosition;
    }

all the parts of my playerdata class requiring transform stuff

[System.Serializable]
public class PlayerData
{
    public float[] playerTransform = new float[3];

    public PlayerData(Player player)
    {

        playerTransform[0] = player.transform.position.x;
        playerTransform[1] = player.transform.position.y;
        playerTransform[2] = player.transform.position.z;

    }

all the values are being saved and are showing in the debug.log statments like they should

Are you sure you’re not setting the object’s position anywhere else in your code, or that any character controller script you’re using isn’t doing so?

that’s what i’m thinking, the character controller script may be overriding the changes maybe?

Maybe. Try disabling the character controller and see if the position gets properly set.

that seems to be the case, the transform changed after toggling the controller off. I guess when the load button is pressed ill have to disable the controller for a second or something