how do you assign a team on server addplayer?

Question

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”);
players++;
}

0
ultimate 3 months 0 Answers 79 views 0

About ultimate


Follow Me

Leave an answer