Child object not moving with parent.

I have a gameObject with a rigidBody2D attached to it which moves at a certain velocity but when I instantiate a gameObject as a child to that object it doesn’t move with the parent. Why?

Can you post screenshot of your hierarchy after instantiating? are you sure you set the parent of instantiated object via code? Does your child object have any script component that modify its transform.position?

This is really late, but maybe it will help someone else who finds this.
this is what I did.
*NOTE: When you set the new Vector3, you’ll need to use some sort of offset. I used my transform.position.y + 0.25… but that is just to get the object directly above my parent object.
I hope this helps someone.

[SerializedField]
GameObject gObject;

void Start {
GameObject go = Instantiate(gObject, new Vector3(0f, 0f, 0f), Quaternion.identity) as GameObject;

go.transform.parent = this.transform;
}