Player movement problem

Hi, I have a problem with my character. I am trying to move my player according to the animations of it and with pressing keyboard keys. When I press the WASD keys, the animation is working on the character but character is not moving forward or anywhere. Can you help me? My code is like below:

public float turnSpeed = 20f;

Animator m_Animator;
Rigidbody m_Rigidbody;
Vector3 m_Movement;
Quaternion m_Rotation = Quaternion.identity;

void Start()
{
m_Animator = GetComponent();
m_Rigidbody = GetComponent();
}

void FixedUpdate()
{
float horizontal = Input.GetAxis(“Horizontal”);
float vertical = Input.GetAxis(“Vertical”);

m_Movement.Set(horizontal, 0f, vertical);
m_Movement.Normalize();

bool hasHorizontalInput = !Mathf.Approximately(horizontal, 0f);
bool hasVerticalInput = !Mathf.Approximately(vertical, 0f);
bool isWalking = hasHorizontalInput || hasVerticalInput;
m_Animator.SetBool(“IsWalking”, isWalking);

Vector3 desiredForward = Vector3.RotateTowards(transform.forward, m_Movement, turnSpeed * Time.deltaTime, 0f);
m_Rotation = Quaternion.LookRotation(desiredForward);

}

void OnAnimatorMove()
{
m_Rigidbody.MovePosition(m_Rigidbody.position + m_Movement * m_Animator.deltaPosition.magnitude);
m_Rigidbody.MoveRotation(m_Rotation);
}

So it sounds like you need to enable root motion. Have you done all the steps described on that page?

Please take a look at Rigidbody component a your game character (propably John Lemon). Maybe you have check all boxes at freeze position (x,y,z). You should have only at “y” box checked. To check it, open inspector of character and click constraints and check freeze position. Propably you’ve made mistake checking boxes when you wanted to freeze rotation.

Yes I got it from the John Lemon tutorial everything looks the same as it but I am trying it with other character in other project. Root motion is controlled from this script and I didn’t even freeze any position. When I freeze it, nothing changes. If you suggest another way i can use it too. I am using it because it feels smoother