Make into child of a parent in c#

GameObject mainpumkinclone = (GameObject)Instantiate(pumkin,
floorPosition + new Vector3(x, y, z), Quaternion.identity);
mainpumkinclone.transform.parent = transform.Find(“prickle” + i);

This is my code but mainpumkincloneis not become a child of a specific prickle.

Please help to solve this issue.

thanks in advance.

mainpumkinclone.transform.parent = GameObject.Find(“prickle” + i).transform;

works fine.