private void CmdRemoveFromHand(NetworkIdentity id) { Debug.Log("Card NULL: " + (id.GetComponent <Card>() == null)); if (!CardNetworkManager.Instance.IsHost ) //To avoid reducing solar twice(on client side and host side when a client is hosting) { int solar = PlayerStatistics.GetValue <int>(CardPlayerStatType.Solar); int sub = id.GetComponent <Card>().Statistics.GetValue <int>(CardPlayerStatType.Solar); solar -= sub; PlayerStatistics.SetValue(CardPlayerStatType.Solar, solar); } Hand.RemoveCard(id.GetComponent <Card>()); }