Picking up objects makes other objects disappear too?

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;

3076101--231460--Jewels.png

use prefab for jewel

The reason they all disappear is probably because you’ve got all your jewels as children of a parent jewel. So if you collide with the parent, the parent gets SetActive(false) called on it, it will become inactive along with all of its children.

If you want to organize your jewels in the hierarchy, create a new empty gameobject to be the parent.