how to make the object that been parent stay the in the same size

Hi, I am doing a puzzle like a game where the player can jump on the platform and move with the platform but I encounter problem that is if I parent the player with the moving platform the player size will become like the size of the platform here my code :

    private void OnCollisionEnter2D(Collision2D other)
    {
        //Check if the player has collide with gameobject with tag "Finish"
        if (other.gameObject.CompareTag("Finish"))
        {
            isWin = true;
        }

        //Check if the player has collide with gameobject with tag "Platform"
        else if (other.gameObject.CompareTag("Platform"))
        {
            playerTransform.parent = other.gameObject.transform;
        }
    }

    private void OnCollisionExit2D(Collision2D other)
    {
        //Check if the player has collide with gameobject with tag "Platform"
        //unparent the player from the platform
        if (other.gameObject.CompareTag("Platform"))
        {
            playerTransform.parent = null;
        }

@zeref_slayer you need to separate the collider and the mesh
first create an empty game object, you can call it moving platform then attach a box collider in it and set the tag to platform then create a box under moving platform called mesh and remove its collider, you can resize the mesh and edit the collider. make sure that the MovingPlatform scale is set to default (1,1,1).

I hope it helps :slight_smile: