public void SetPlayerText() { InputField field = nameInputObject.GetComponentInChildren <InputField>(); GameObject player = GameObject.Find("LOCAL Player"); NetworkedPlayerScript nps = player.GetComponent <NetworkedPlayerScript>(); nps.CmdSetPlayerText(field.text); }