Double Tap/Press script

C#:

i’ve spent the last two days trying to think up a double tap script so that when i double tap the walk joystick i run consistenly as long as i hold down the button

Just create a bool or a float and have it reset itself after a given time to check if they have already pressed forward

float pressedForward = 0;

if(ButtonPushedToGoForward){
   if(pressedForwardbefore > 0.5f){
      Sprint();
   }
   else{
      pressedForwardbefore = 1f;
      Walk();
   }

}
if(pressedForwardbefore>0)
pressedforwardbefore -= 1*Time.deltaTime;

or something like that.

WUCC