void die_player() { player.gameObject.GetComponent <FirstPersonController>().GetEntity().GetState <IPlayerState>().deaths++; WeaponControl weapons = EquipmentUI.GetComponent <WeaponControl>(); weapons.openMenu(); var evnt = PlayerVisibilityChanged.Create(Bolt.GlobalTargets.Others); evnt.Player = player.GetComponent <FirstPersonController>().GetEntity(); evnt.Visible = false; evnt.Send(); player.SetActive(false); }