I am absolutely new to coding and unity. I’m trying to make a top down game where I have to pick up jewels for points and run away from the zombies. Problem is, if I pick up a jewel, the other ones disappear too.
The jewel is a Circle Collider 2D. I just duplicated the Jewels.
The coding I’m using is
void OnCollisionEnter2D(Collision2D other) {
if (other.gameObject.CompareTag (“Jewel”)) {
other.gameObject.SetActive (false);
count = count + 1;
CountText.text = "score: " + count;
