Snychronize player's name over Photon?

This is more of a straightforward question if you understand Photon Networking. When you spawn a player using Photon Networking, that player is also spawned on other clients (with something along the lines of PhotonNetwork.Instantiate(prefab, etc);). I have set that spawning player as myPlayerGO (which is only on the local machine). What I want to do, is when I spawn that player, I also want to set a variable (which is a string) to what the local player has entered. So the local player enters a string, then they spawn across the network, while simultaneously grabbing that player and setting that one variable on ALL clients to a string on all clients. Any ideas?

try using PhotonTargets.AllBuffered. AllBuffered RPC calls means that newly joined players will recieve the RPC calls of other players even if they have not joined yet

void addString()
{

string qwe = "qwe";//player input

GetComponent().RPC (“theOtherPlayerString”,PhotonTargets.AllBuffered,qwe);

}

[RPC]

void theOtherPlayerString(string m)
{

 Debug.Log(m);

}

I’ve figured it out. I didn’t need to grab a string at all, it’s automatically synched with PhotonNetwork.owner