How do I make it so if a player double taps UP ARROW to run. Here’s what I got following a tutorial (this is only a portion of the whole thing):
if(Character)
{
// toggle between walk and run with <left shift> R
if(Input.GetKey(KeyCode.LeftShift) && Input.GetKeyDown(KeyCode.R))
{
if(running == true){
running = false;
if(walking == true) Character.animation.CrossFade("walk");
}
else{
running = true;
if(walking == true) Character.animation.CrossFade("run");
}
}
}