Parenting with Instantiate

I am creating objects using script ( Instantiate function ), but how to parent created objects to something? I’ve already attached the script to the object, that will be a father. But can’t write normal script for parenting. I ended with something like that:

public GameObject prefab;
public int numberOfObjects = 20;
public float radius = 5f;

void Start() {
			for (int i = 0; i < numberOfObjects; i++) {
					float angle = i * Mathf.PI * 2 / numberOfObjects;
					Vector3 pos = new Vector3 (Mathf.Cos (angle), 0, Mathf.Sin (angle)) * radius;
					GameObject BrickPrefab = Instantiate (prefab, pos, Quaternion.identity);
					GameObject prefab = BrickPrefab.Find("clone");
					prefab.transform.parent = transform;

			}
	}
}

But something is definitely wrong here.

I’m confused a bit about your Find() call. Is this just trying to find the game object just created? Assuming the game object Instantiated is the child and parent is the game object with the script attached you want:

void Start() {
         for (int i = 0; i < numberOfObjects; i++) {
              float angle = i * Mathf.PI * 2 / numberOfObjects;
              Vector3 pos = new Vector3 (Mathf.Cos (angle), 0, Mathf.Sin (angle)) * radius;
              GameObject BrickPrefab = Instantiate (prefab, pos, Quaternion.identity) as GameObject;
              BrickPrefab.transform.parent = transform;
 
         }
    }
}