Setting Player Name Works Running 2 Game Instances on The Same Computer, But Not On 2 Computers

I spent 2 weeks trying to get player names and colours working over the network. After a while of searching through useless unity U-net documentation and Various forums posts (which helped a lot), it finally worked. Then I sent it to a friend so we could try it out together, but guess what? it didn’t work. Yes. The problem is that whatever you set the name of the player on one computer sets the same name to ther other and I cant understand why. This is a portion of my script, and yes the player name and colourIndex are sync vars.

It works two instances on the same computer by the way.

Thank you for you for yer helppy

 public void SetPlayerColour(int _colour)
    {
        switch (_colour)
        {


            case 0:
                currentPlayerMaterial = playerMaterials[0];
                break;
            case 1:
                currentPlayerMaterial = playerMaterials[1];
                break;
            case 2:
                currentPlayerMaterial = playerMaterials[2];
                break;
            case 3:
                currentPlayerMaterial = playerMaterials[3];
                break;
            case 4:
                currentPlayerMaterial = playerMaterials[4];
                break;
            case 5:
                currentPlayerMaterial = playerMaterials[5];
                break;
            case 6:
                currentPlayerMaterial = playerMaterials[6];
                break;
            case 7:
                currentPlayerMaterial = playerMaterials[7];
                break;
            case 8:
                currentPlayerMaterial = playerMaterials[8];
                break;
            case 9:
                currentPlayerMaterial = playerMaterials[9];
                break;
            case 10:
                currentPlayerMaterial = playerMaterials[10];
                break;



        }

        for (int i = 0; i < playerObjectsWithMaterials.Length; i++)
        {

            playerObjectsWithMaterials[i].GetComponent<Renderer>().material = currentPlayerMaterial;

        }
    }


    public void OnColourChanged(int _colour)
    {

        playerColourIndex = _colour;
        SetPlayerColour(playerColourIndex);

    }

    public void OnNameChanged(string _name)
    {
     
        playerName = _name;
        SetPlayerName();
       

    }

    void SetPlayerName()
    {
        GetComponentInChildren<Text>(true).text = playerName;
    }



    public override void OnStartServer()

    {
        playerColourIndex = PlayerPrefs.GetInt("playerColour");

        playerName = PlayerPrefs.GetString("playerName");
    }


    public override void OnStartClient()

    {
       
        SetPlayerName();        
        SetPlayerColour(playerColourIndex);
     
       

        string _netID = GetComponent<NetworkIdentity>().netId.ToString();
        Player _player = GetComponent<Player>();





        GameManager.RegisterPlayer(_netID, _player, playerName);



    }

wait, isn’t that how it is supposed to work? the server reads the player prefs on that machine, then syncs that name across the wire, to the other machine. You only have 1 player pref which is read by all instances of this script (PP.GetString(“playerName”);), so all instances will have the same name… both on the server and on any clients.

Oh I see, I feel dumb now :(. How can I store the player name so that both machines dont have the same name? and why does it work running 2 instances but not on 2 conputers? Thank you!