child not moving with parent

very basic here: i want to be able to instantiate cubes as childs of my gameObj and move them toghether.
this is just testcode: i want to instantiate a cube object and then apply a force to my current object. the cube should follow, right? no, it doesnt. (gravity is off)

public Transform cube;
Transform newCube;
Rigidbody rb;

void Start ()
{
    rb = GetComponent<Rigidbody>();
    newCube = (Transform)Instantiate(cube, transform.position + Vector3.left, transform.rotation);
    newCube.parent = transform;
}

void FixedUpdate()
{
    rb.AddForce(Vector3.forward);
}

I tried your code and it works fine with me.

The Cube you’re trying to instantiate does it also have a rigidbody ? because that would make him not follow.

If not what kind of component do you have on your cube ? For my part i only have Collider, MeshRenderer and Mesh Filter and it works fine.

You can check “IsKinematic” when they are together, this will make them follow

I got it fixed as I made freeze position constraints checked.

It’s an old question but I will just leave the answer here. For me, the child was set to static by accident. Double-check you didn’t turn it on.