//We use OnCollisionEnter when bump into something. void OnTriggerEnter(Collider other) { if (other.gameObject.tag == "Pipes") { rb.velocity = Vector2.zero; struckSomething = true; StartCoroutine(GameManager.instance.PlayerDied()); audio.Play(); } if (other.gameObject.tag == "Coin") { currencyManager.CollectCoin(); other.gameObject.transform.position = new Vector3(1100, 1100, 1100); } }