private void OnCollisionEnter(Collision other) { if (other.gameObject.tag == "Player" && coinBool) { Destroy(gameObject); myCoinController.UpdateCoins(); } }