Move an enemy on top of a moving platform

I have a setup which involves a moving platform(in green) and a patrolling enemy on top of it, shown below:
alt text

The platform is moving left and right, periodically and so is the patrolling enemy both using rigidbody.velocity. Both when in motion separately are appearing fine. But when enemy is on the top of the platform, with enemy being the childobject of platform, the enemy is appearing static (just playing moving animation in it’s place) even though I have corrected for the velocity of the platform. Below is the snippet of my Update() method:

void Update()
{
    if (parent)
        parentVelocity = parent.GetComponent<Rigidbody2D>().velocity;

    Debug.Log("parentVelocity=== " + parentVelocity);
    if (IsFacingRightOrUp())
    {
        if (moveVertical)
            myRigidBody.velocity = new Vector2(0f, moveSpeed);
        else
            myRigidBody.velocity = new Vector2(moveSpeed, 0f);
    }
    else
    {
        if (moveVertical)
            myRigidBody.velocity = new Vector2(0f, -moveSpeed);
        else
            myRigidBody.velocity = new Vector2(-moveSpeed, 0f);            
    }
    Debug.Log("myRigidBody.velocity === " + myRigidBody.velocity);
    myRigidBody.velocity += parentVelocity;
    Debug.Log("myRigidBody.velocity === " + myRigidBody.velocity);
}

It is producing the Debug logs as follows, parentVelocity being defaulted to (0,0):

alt text

What should I do to make the motion of enemy same to an observer on the platform as the motion ob enemy would appear when both are standing on the static ground?

I might be interperting this wrong, but why are you correcting for the velocity of the platform if it’s a child of it? it should be able to be connected as a child to the platform and move with it, and move only in relation to it using the script, 0,0,0 will always be the center of the platform if the enemy is a child.