using Unity.Netcode;
using UnityEngine;

public class PlayerSpawner : NetworkBehaviour
{
    public override void OnNetworkSpawn()
    {
        if (IsOwner)
        {
            var spawnPoints = GameObject.FindGameObjectsWithTag("SpawnPoint");
            transform.position = spawnPoints[Random.Range(0, spawnPoints.Length)].transform.position;
        }
    }
}
