How do i make a multi action input on one button or one button two action based on amount pressed

I’m trying to map two action two one button im trying to get my character to toggle crouch if the button is pressed once and if the button is pressed twice it sets the user to sprint or even setting the crouch to hold and sprint to toggle after on button press but nothing i do seems to work when ever the button is pressed it will crouch but if i attempt to toggle sprint it will do the crouch animation first then go into sprint mode how do i get that to stop and make this work

A few years back I had a thread about a dodge roll, finally got to a part to double tap a key to activate it. I think you are wanting something similar. How many presses of a key and in what time frame.

Make a variable (integer) called “# presses”.