The question might seem a little too weird but I want to add the object "Capsule" to my gameobject using script (see the photo below)
This is my code for adding components in my object:
object1 = (GameObject)Resources.Load (name) as GameObject;
myObject = Instantiate (object1);
myObject.transform.SetParent (parent.transform);
myObject.transform.position = new Vector3 (0, 0, 0);
myObject.transform.localScale = new Vector3 (70f, 70f, 70f);
myObject.AddComponent<BoxCollider> ();
myObject.AddComponent<CapsuleCollider> ();
myObject.AddComponent<MeshRenderer> ();
myObject.gameObject.SetActive (true);
What could be the possible solution for this? Thank you very much!

SetParentworks? We need more information about your issue here