Continuous sprint

So heres the deal , my sprint animation plays for about half a second then goes back to walk/idle animation , and i want to keep it playing UNTIL i let go of shift+forward … im not a pro at scripting and i’ve looked a few tutorials and they arent helping .

function Update()
{
  if(Input.GetButtonDown("sprint"))
  {
     isSprinting = true;
     animation.Play("sprintUMP");
  }
  else
  {
 
     if(Input.GetButtonUp("sprint"))
     {
       isSprinting = false;
       animation.Stop("sprintUMP");
      }
 
 
     }
 
 
}
  1. Is the sprint clip set to loop?
  2. (Side note:) Instead of animation.Stop(“sprintUMP”); you might need animation.Play(“walk”); to get the character to resume playing the walk animation when it stops sprinting. I say might because I don’t know what other parts of your code might be doing. If that other code is calling animation.Play(“walk”) [perhaps half a second later?], that might be your problem.