ystem.Collections; using System.Collections.Generic; using UnityEngine; public class Movemen : MonoBehaviour { public float movespeed; //public Rigidbody rb; public float jumpforce; public CharacterController controller; private Vector3 direction; public float gravityscale; public Animator anims; void Start () { //rb = GetComponent<Rigidbody>(); anims = GetComponent<Animator>(); controller = GetComponent<CharacterController>(); } // Update is called once per frame void Update () { //rb.velocity = new Vector3(Input.GetAxis("Horizontal") * movespeed, rb.velocity.y, Input.GetAxis("Vertical")* movespeed); /*if(Input.GetButtonDown("Jump")) { // rb.velocity = new Vector3(rb.velocity.x, jumpforce, rb.velocity.z); } */ //direction = new Vector3(Input.GetAxis("Horizontal") * movespeed, direction.y , Input.GetAxis("Vertical") * movespeed); direction = (transform.forward * Input.GetAxis("Vertical")* movespeed ) + (transform.right * Input.GetAxis("Horizontal") * movespeed); direction = direction.normalized * movespeed; float ystore = direction.y; direction.y = ystore; if (controller.isGrounded ) { direction.y = 0f; if (Input.GetButtonDown("Jump")) { direction.y = jumpforce; } } direction.y = direction.y + (Physics.gravity.y * gravityscale); controller.Move(direction * Time.deltaTime); anims.SetFloat("speed", (Mathf.Abs(Input.GetAxis("Vertical")) * Mathf.Abs(Input.GetAxis("Horizontal")))); anims.SetBool("isGrounded", controller.isGrounded); } } guys i have a question i dont really have a problem with the code well, not i think of . but the real problem i have is with animation so i have two animations idle and walk when i play it idle animation works fine but when i try to move forward the animation for walk doesnt work it doesnt activate . the only time the walk animation will work if you will press letter w and letter a at the same time by the way im using wasd for movement control if i only press w for movement it moves but it doesnt walk it moves forward but the animation while its moving forward is the idle animation not the walk animation so im wondering if there is something i need to change in the setting or what I followed a tutorial by the way and everything in the video works fine and the only problem i have is with the walk animation i already made sure that i follow all the steps and i already made sure that i have the right codes thanks for the response