Unity Netcode - Method not being called

I have a Network Object to hold all of the player’s weapons, which needs to be spawned in seperately as a prefab. I then need to spawn in a starting weapon for that player straight after this, which is again a Network Object. These need to be seperate methods though, because the same logic to add a weapon can be called during the game when the player picks up a new weapon.

When I run this code, it creates the initial Gun Holder Objects as expected, and the Host/Server player also has their first gun added to the Holder object. But when the client joins, it creates the Gun Holder, but then skips through the UpdateGuns method which allocates the initial gun prefab, but then still seems to run the second AddNewGun_ServerRpc method, because at that point it throws a null pointer saying that the currentNewGun hasn’t been assigned. I’ve checked this with logging, where on the second player joining it skips logging for UpdateGuns but still logs for AddNewGun_ServerRpc.

Does anyone know what I’m doing wrong here? It must be something to do with the order I’m calling the methods combined with where the calls are being run (Server or Client), but I can’t wrap my head around this.

public Transform gunHolder;

public GameObject gunHolderNetworkObject;
private GameObject gunHolderReference;

public GameObject startGun;
public GameObject currentNewGun;

private void Start()
    {
        if (!IsOwner) return;

        SetUpGuns_ServerRpc();

        UpdateGuns(startGun);
    }

public void UpdateGuns(GameObject gun)
    {
        if (!IsOwner) return;

        currentNewGun = gun;

        AddNewGun_ServerRpc();
    }

[ServerRpc(RequireOwnership = false)]
    private void SetUpGuns_ServerRpc(ServerRpcParams serverRpcParams = default)
    {
        var clientId = serverRpcParams.Receive.SenderClientId;
        if (NetworkManager.ConnectedClients.ContainsKey(clientId))
        {
            NetworkClient client = NetworkManager.ConnectedClients[clientId];
            Transform clientGunHolder = client.PlayerObject.GetComponent<PlayerController>().gunHolder;

            gunHolderReference = Instantiate(gunHolderNetworkObject, clientGunHolder.position, clientGunHolder.rotation);
            gunHolderReference.GetComponent<NetworkObject>().SpawnWithOwnership(clientId);
            gunHolderReference.GetComponent<GunHolderReference>().SetGunHolder(clientGunHolder.gameObject);
        }
    }

[ServerRpc(RequireOwnership = false)]
    private void AddNewGun_ServerRpc(ServerRpcParams serverRpcParams = default)
    {
        var clientId = serverRpcParams.Receive.SenderClientId;
        if (NetworkManager.ConnectedClients.ContainsKey(clientId))
        {
            NetworkClient client = NetworkManager.ConnectedClients[clientId];
            GameObject currentNewGun = client.PlayerObject.GetComponent<PlayerController>().currentNewGun;

            GameObject newGun = Instantiate(currentNewGun, gunHolder.position, gunHolder.rotation);
            newGun.GetComponent<NetworkObject>().SpawnWithOwnership(clientId);

            newGun.transform.parent = gunHolderReference.transform;

            playerGuns.Add(newGun.GetComponent<Gun>());
            newGun.GetComponent<Gun>().currentAmmo = newGun.GetComponent<Gun>().maxAmmo;

            UIController.instance.ShowNotification($"{Gun.gunNames[newGun.GetComponent<Gun>().gunType]}");
        }
    }

I’ve managed to resolve this, was all about the process flow between methods. Had to rewrite the code to create a logic flow that passes between ServerRpc calls and ClientRpc calls sequentially, with each subsequent call contained within the previous call to ensure the async Rpc calls get completed before the next one is fired off.