how do you assign a team on server addplayer

my code

    public override void OnServerAddPlayer(NetworkConnection conn, short playerControllerId)

        var player = (GameObject)GameObject.Instantiate(playerPrefab, spawns.position, Quaternion.identity);

        NetworkServer.AddPlayerForConnection(conn, player, playerControllerId);

        Debug.Log("Client has requested to get his player added to the game");


You would have to have some reference to it. In the prefab create a player team properties and perhaps an enum in it with a team.

Assign the team here.

Not sure what youre asking for otherwise