Sending int value owned by Masterclient to other client

My game has 2 scenes named “menu” and “game”. There is an int value that players can change in the menu. (this value is 1-2 or 3). The room is set up, the players join the room, and when the players are ready, masterclient start the game and the “game” scene is loaded. What I want in this part: The int value belonging to the masterclient is initially taken, this value is sent to all other players, and the int value of the other players equals the int value of the masterclient. I tried doing this with rpc, I don’t get any errors but the values ​​are not synchronized. Anyone know why?

public class xcontrol : MonoBehaviourPunCallbacks {
	private int x;
	public GameObject c1,c2,c3;

[PunRPC]
	private void xkaç(int x)
	{
        if (PhotonNetwork.IsMasterClient)
        {
			x= PlayerPrefs.GetInt("xset");
			Debug.Log(x);
			PlayerPrefs.SetInt("xset", x);
		}


	}
	void Start()
	{
		photonView.RPC("xkaç", RpcTarget.OthersBuffered, x);
		xkaç(x);
		if (x == 1)
		{
			c1.SetActive(true);
			c2.SetActive(false);
			c3.SetActive(false);
		}
		if (x == 2)
		{
			c1.SetActive(false);
			c2.SetActive(true);
			c3.SetActive(false);
		}
		if (x== 3)
		{
			c1.SetActive(false);
			c2.SetActive(false);
			c3.SetActive(true);
		}


	}
}

Yes.

your function xkaç might be called on all clients but it does nothing with the value you receive. Only the master client will save it to the playerprefs.
All other players do nothing at all.

May i propose some changes to your code - please DON’T blindly copy it, understand it and then use it if you deem it good:

public class xcontrol : MonoBehaviourPunCallbacks {
    private int x;
    public GameObject[] cObjects; //assign former c1,c2,c3 in order to this array
 
    [PunRPC]
    private void xkaç(int receivedX)
    {
        Debug.Log($"Setting new value for x: {receivedX}");
        x = receivedX;
       
        if (!PhotonNetwork.IsMasterClient)
        {
             //could set x for all non-master clients here:
             //PlayerPrefs.SetInt("xset", receivedX);
        }

        setCObjectsActiveState();
    }

    void Start()
    {
        if (PhotonNetwork.IsMasterClient)
        {
             // give x as second argument here to return it as default if "xset" is not present as key:
             x = PlayerPrefs.GetInt("xset", x);
             photonView.RPC("xkaç", RpcTarget.OthersBuffered, x);
             xkaç(x);
        }
    }

    private void setCObjectsActiveState()
    {
        for(int i=0;i<cObjects.Length;i++)
        {
            cObjects*.SetActive(i==x);*

}
}
}
Also as a sidenote: you should work on your variable names. Variables, functions and classes must always describe what they are doing. This helps you and others to understand the code. e.g. c1, c2 … or x and xcontrol are bad names. same for xkaç
Also i changed c1, c2 and c3 to be a list instead. this helps to keep your code maintainable as you can now simply add more objects by adding just one element to the array and you don’t have to change any code for it to still work.
EDIT: For clean complete solution added the IsMasterClient check in Start as this was indeed missing.

You only want the Master client to send the RPC with the x value to the other clients. Move “if (PhotonNetwork.IsMasterClient)” down to the line above “photo view.RPC” so only Master client sends it. Then all you need inside “xkaç(int” function is this.x = x; and setCObjectsActiveState();…
So, your master sends it’s x value to all the other clients and they set their this.x to be that value and call setCObjectsActiveState() but it might be slightly better if that function took a parameter instead of using this.x do setCObjectsActiveState(x)