The child object moves differently from the parent object

Help! I’m a newbie to Unity. Please see the attached image.
스크린샷 2024-01-28 005627

Where the location marked is the parent object with the Mesh Renderer removed. The character you can see on the left is the child object. If I move forward with the keyboard, the parent object moves a little bit as you see, while the character is far away.

Because of this, even if the character is off the ground, the main object is still on the ground, so the problem is that gravity is not applied. Also, even if I move back with the keyboard, the character still moves forward. What’s the problem? I’m a beginner just started UNITY, so it’s not easy to explain the problem.

Can you send a screenshot of your hierarchy

Moving the parent object automatically moves the child object but moving the child object does not affect the parent’s transform.

I have never encountered a problem of a parent moving without a child and I don’t think it’s possible unless you’re resting the child’s position like this:

GameObject child = transform.GetChild(0);
Vector3 lastPos = child.transform.position;

// Move the parent
transform.Translate(0,1,0);

// Reset the child's position
child.transform.position = lastPos;

But your second problem about the child being on air while the parent on the ground is because didn’t add a rigidbody.

To solve this add a rigidbody component on the parent and make sure the “Use gravity” is checked