My movement gets blocked, when I activate the animator

Hello guys, Iam pretty new to Unity and try to get the hang on by watching a lot of tutorials. At the moment Iam working on a 2D platformer. I use the script from “GamesfromJames” on Youtube. But now I stuck at one point.

Without any animations my character moves on the x and jumps on the y axis. When I activate the animator my character stucks in the air playing the idle-animation. When I activate the Apply Root Motion box he falls onto the ground and plays the idle animation. At no point at all I can move my character, when the animator is activated.

This is my script:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class PlayerControl : MonoBehaviour {

    public float moveSpeed;
    public float jumpForce;

    public bool grounded; 
    public LayerMask whatIsGround;

    private Collider2D myCollider;

    private Rigidbody2D myRigidBody;

   private Animator myAnimator;

    // Use this for initialization
    void Start() {
        myRigidBody = GetComponent<Rigidbody2D>();

        myCollider = GetComponent<Collider2D>();

         myAnimator = GetComponent<Animator>();
        
    }

    // Update is called once per frame
    void Update() {
        
       
        grounded = Physics2D.IsTouchingLayers(myCollider, whatIsGround); 

        if (Input.GetKeyDown(KeyCode.Space)) ;
        {
            if (grounded) 
            {
                myRigidBody.velocity = new Vector2(myRigidBody.velocity.x, jumpForce); 
            }
        }


        if (Input.GetKey(KeyCode.D))
        {
            myRigidBody.velocity = new Vector2(moveSpeed, myRigidBody.velocity.y);
        }


       if (Input.GetKey(KeyCode.A))
        {
            myRigidBody.velocity = new Vector2(-moveSpeed, myRigidBody.velocity.y);
        }


        myAnimator.SetFloat("Speed", myRigidBody.velocity.y);
        myAnimator.SetBool("Grounded", grounded);
    }
}

The only differences I know I did from the youtube video “Unity Endless Runner Tutorial #3 - Animations & Following Camera” is the object sprite. I animated my game object inside of unity using a lot of layers (for arms, legs and so on).

Could you help me?
Big thanks in advance!

Ive found the reason for my problem. For everyone in the near future with the same issues:
The problem is, that the animator collides with the script in the same place of the hierachy. Just place the animator as a child of boxscript/rigidbody and player controller and everthing’s fine.