- Home /
Question by
bisoncool1 · May 06, 2020 at 10:53 AM ·
powerup
How to make an invincible powerup
Hi, my player dies when he touches something using onTriggerEnter:
void OnTriggerEnter(Collider other) { if(other.CompareTag("Button")) { door.gameObject.SetActive(false); } if(other.CompareTag("Deadly")) { SceneManager.LoadScene("StartMenu"); } if(other.CompareTag("Bomb")) { explosionParticle.Play(); SceneManager.LoadScene("StartMenu"); } } I have an object that I want to make this script not apply when it is touched. Also, I would like it to disappear when it is touched so it can't be used again.
Comment
Your answer