How to set parent

Hey all!
I’m making this game where you have a certain number of “hexapes”, but I can never know how much there are, because the hexapes are procedurally generated. An hexape is simply a center circle (smaller then the other ones) and six bigger circles disposed like a hexagon. Every one of those seven circles have the same parent : an empty gameobject called hexape.
The hexapes appear in the level with a distance that makes two of the circles of two different hexapes to overlap.
Hope you’re getting it so far.
What I want to do is when an hexape is rotated (each time you click or tap it rotates exactly 60 degrees), the common circles between the two hexapes become child of the rotating one, and the one that’s not rotating has those two circles set to null, so they should disappear until the rotating hexape brings back two circles.

If you’re not understanding because my english is bad or because I didn’t explain as I should, please post a comment, I’ll try to explain better.

Here’s what I have so far:

(this script is attached to all the circles in the scene (except for the center))

using UnityEngine;
using System.Collections;

public class CircleDestroyer : MonoBehaviour {

	void OnTriggerEnter2D (Collider2D any) {

		if (any.gameObject.GetComponent<HexapeConstructor>().isRotatingMessage() == true) {
		
			any.gameObject.transform.SetParent(this.gameObject.transform.parent);
			this.gameObject.GetComponent<SpriteRenderer>().sprite = null;
		
		}
	}
	
}

Something weird is happening : when the hexapes rotate simultaneously, the last one that got clicked gets smaller and rotates with the other hexape, like the whole hexape is child of the other one. That’s not what I want.

Btw, yes, all circles have a trigger circle collider.

Hope you can help me!

Sorry i’m not sure to understand what you want.

Replace that: any.gameObject.transform.SetParent(this.gameObject.transform.parent);

By : any.gameObject.transform.parent = this.gameObject.transform.parent;