IEnumerator Die() { yield return(new WaitUntil(() => dnc.day == true)); yield return(new WaitForSeconds(2f)); pr2.GetComponent <PhotonView>().RPC("DeathInfo", PhotonTargets.All); pr2.GetComponent <PhotonView>().RPC("DieFunc", PhotonTargets.All); pr2.GetComponent <PhotonView>().RPC("Ghost", PhotonTargets.All); pr2.GetComponent <PhotonView>().RPC("DisableCollider", PhotonTargets.All); pr2.Info.text = "You were killed"; }