Spawn players in different positions [Solved]

I’m trying to spawn players in different positions. I use RPC for this, the players will spawn in different positions, as I want, BUT this method additionally duplicates (to be more precise, it will spawn copies of the player depending on the total number of all players) of the player, how can this be fixed? Maybe there is some kind of test for this? Or a better way?

public class PlayerManager : MonoBehaviour
{
    private PhotonView _photonView;

    private void Start()
    {
        _photonView = GetComponent<PhotonView>();

        if (_photonView.IsMine)
        {
            int i = 0;
            foreach (var p in PhotonNetwork.PlayerList)
            {
                _photonView.RPC(nameof(CreateController), p, i);
                i++;
            }
        }
    }

    [PunRPC]
    private void CreateController(int i)
    {
        var playerAvatar = PhotonNetwork.Instantiate(Path.Combine("PhotonPrefabs", "Player"), GameManager.instance.spawnPoints[i].position, Quaternion.identity);
    }
}

If you add break after i++, then only the Master player and his copies will be saved.

Following because I’m trying to make a respawn system too

Anyone who needs a solution.

public class PlayerManager : MonoBehaviour
{
    private PhotonView _photonView;
    private void Start()
    {
        _photonView = GetComponent<PhotonView>();

        if (_photonView.IsMine)
        {
            int i = Array.IndexOf(PhotonNetwork.PlayerList, PhotonNetwork.LocalPlayer);
            var playerAvatar = PhotonNetwork.Instantiate(Path.Combine("PhotonPrefabs", "Player"),
                GameManager.instance.spawnPoints[i].transform.position, Quaternion.identity);
        }
    }
}