Network is spawning more objects then desired

I have been hunting around and trying to solve this one bug, and can’t find anything.

I start my game with the network lobby manager where everyone joins the game. when a player connects, they are then supposed to spawn a building on one of a random number planets. unfortunately, more objects are being spawned then I desire. It appears from my testing that each client is spawning 2 buildings and the host 1 building. I want each player to spawn only 1 building.

Here is the relevant code:

void Start()
    {
        if (localPlayerAuthority)
            CmdSpawnStartBuilding(planetId);
    }

    [Command]
    private void CmdSpawnStartBuilding(int Id)
    {
        GameObject planet = GameObject.FindGameObjectsWithTag("Planet")[Id];
        int index = UnityEngine.Random.Range(0, planet.GetComponent<PlanetMeshGeneration>().gridPoints.Length);
        
        Vector3 spawnPoint = openGridPoints[index];
        Quaternion spawnRotation = Quaternion.LookRotation(Vector3.ProjectOnPlane(planet.transform.forward, spawnPoint ), spawnPoint);
       
        
        //FIXME: This is being called twice on clients. not sure why.
        Debug.Log("Called CmdSpawnStartBuilding");
        GameObject building = Instantiate(startBuilding, spawnPoint, spawnRotation);
        building.transform.SetParent(planet.transform, false);
        NetworkServer.Spawn(building);
        RpcSyncBuildingOnce(building.transform.localPosition, building.transform.localRotation, building, building.transform.parent.gameObject);
    }

    [ClientRpc]
    public void RpcSyncBuildingOnce(Vector3 localPos, Quaternion localRot, GameObject building, GameObject parent)
    {
        building.transform.parent = parent.transform;
        building.transform.localPosition = localPos;
        building.transform.localRotation = localRot;
    }

This script is attached to my player object. Also, for reasons unknown to me, the error “trying to send command for object without authority” on the clients (line 4), despite the object being the player object, and it having Local Player Authority.

Well, I found out why my program is creating multiples of the structure. The issue is there are multiple instances of the player prefab that are running Start() (as there should be).
This line of code:

 if (localPlayerAuthority)

was the issue. It should have been:

 if (isLocalPlayer)

Live and learn I guess…