it says it all in the title here is the code
if (isGrounded == false && airdash == true && Input.GetKeyDown(KeyCode.Space))
{
dash();
airdash = false;
}
else if (isGrounded == true && airdash == false)
{
airdash = true;
}
else if (isGrounded == true && airdash==false)
{
dash();
}
else if (isGrounded == false && airdash == false)
{
}
it dosent work the only thing that works was the airdash becomes true on air and false when on the ground and when you dash on air