Player stuck in one spot when animations are enabled

Before I start with my problem, I thank anyone who can help.
I have an object called Player_editmode. It was imported from blender and duplacated so I can edit the components. I am new to animations, If anyone could point me in the right direction on unity to learn how to script for animations, I would be greatful. This is my movement script :

public class Movement_wasd : MonoBehaviour {
    public float speed = 10f;
    public float StrafeSpeed = 5f;
    public float jump = 4f;

    // Use this for initialization

    // Update is called once per frame
    void Update() {
        if (Input.GetKey(KeyCode.W))
        { 
            transform.position += Vector3.forward * Time.deltaTime * speed;
        }
       if (Input.GetKey(KeyCode.A))
        {
            transform.position += Vector3.left * Time.deltaTime * StrafeSpeed;
        }
        if (Input.GetKey(KeyCode.S))
        {
            transform.position += Vector3.back * Time.deltaTime * speed;
        }
        if (Input.GetKey(KeyCode.D))
        {
            transform.position += Vector3.right * Time.deltaTime * StrafeSpeed;
        }
        if (Input.GetKey(KeyCode.Space))
        {

            
            transform.position += Vector3.up * Time.deltaTime * speed;
        
        }
    }
}

When my animations are enabled it doesn’t let me move using this script. Any help will be appreciated fixing this problem.

I’d believe your problem would be “Root Motion” Is Enabled. Go to your Animator and untick “Apply Root Motion”. And it should work for ya.

If it goes to position 0,0,0 in 3D or positon 0,0 in 2D then make the object a child of an empty game object.
(Just figured I’d say that sense you’re new to Animations) as it’s a quite common issue.