Custom room property for remote player/client always returns null

Hie. I'm trying to retrieve a value from the server. From my understanding player custom properties are sync to the server which makes them accessible to any other payer/client who needs them. In my case I'm trying to retrieve a value from a remote player and the returned value is always null.

Here is my logic for creating custom properties for each player. This logic is called in the start function of my GameManager script.

//set the custom properties for this player PhotonNetwork.player.CustomProperties = new Hashtable(); PhotonNetwork.player.CustomProperties.Add("Turns", 0);

There is some logic in between up to the point where I need to retrieve the value of the remote player. Here is the logic throwing a null reference error.

MatchManager.Instance.OppTurns = (int) PhotonNetwork.player.GetNext().CustomProperties["Turns"];

Just to clarify that the problem is with the remote player custom properties. I added some logic to verify this before my actual logic and here it is.

Debug.Log(PhotonNetwork.player.CustomProperties.ToString());//prints out the property Debug.Log(PhotonNetwork.player.GetNext().CustomProperties.ToString()); //throw a null reference error

Can someone assist me on how I can successfully sync the custom property to the server and retrieve for an player local or remote. Thank you.
This discussion has been closed.