When animations play I can't move my player

I never animated in the Unity engine before. Mainly I made games with just shapes but I tried out sprite animation but when the animation plays it locks my player in place and it breaks game physics so my player cant fall. I tried removing the empty game object that checks if it’s jumping but it still doesn’t work. Here is the code please let me know what I’m doing wrong thank you.

private Rigidbody2D rb;
public float runSpeed;
public float jumpForce;
private float moveInput;

private bool isGrounded;
public Transform feetPos;
public float checkRadius;
public LayerMask whatIsGround;

public float jumpTimeCounter;
public float jumpTime;
public bool isJumping;

private Animator anim;

void Start() {
    anim = GetComponent<Animator>();
    rb = GetComponent<Rigidbody2D>();
}

void FixedUpdate() {
    moveInput = Input.GetAxisRaw("Horizontal");
    rb.velocity = new Vector2(moveInput * runSpeed, rb.velocity.y);
}

void Update() {
    isGrounded = Physics2D.OverlapCircle(feetPos.position, checkRadius, whatIsGround);

    if (isGrounded == true && Input.GetKeyDown(KeyCode.W)) {
        isJumping = true;
        jumpTimeCounter = jumpTime;
        rb.velocity = Vector2.up * jumpForce;
    }

    if(moveInput > 0) {
        transform.eulerAngles = new Vector3(0, 0, 0);
    } else if (moveInput < 0) { 
        transform.eulerAngles = new Vector3(0, 180, 0);
    }

    if (moveInput < 0) {
        anim.SetBool("isRunning", false);
    }
    else {
        anim.SetBool("isRunning", true);
    }

    if (Input.GetKey(KeyCode.W) && isJumping == true) {
        if (jumpTimeCounter > 0)
        {
            rb.velocity = Vector2.up * jumpForce;
            jumpTimeCounter -= Time.deltaTime;
        }
        else
        {
            isJumping = false;
        }
    }

    if (Input.GetKeyUp(KeyCode.W)) {
        isJumping = false;
    }
}

}

Is your animator applying root motion? This could mean that the animations themselves are setting the object’s transform.

This is set via a checkbox on the animator component itself.

In case anyone stumbles upon this, the best solution is:
Create an empty gameobject and parent all your rig’s hierarchy and skinned meshes under it
-name it animator
-copy and paste the animator component from your parent gameobject to the animator gameobject you created

Everything should work fine. The idea is, you don’t want to have the logic for movement on the same gameobject as the gameobject where your animator component is attached.

Hope this helps someone!