IEnumerator DodgeRoll() { playerCombat.DodgeAttackCancel(); //Cancel attacks with dodgeRoll DisableMove(); abilityUI.StartCooldown(dodgeCD); playerCombat.canAttack = false; //in case of AttackCancel playerCombat.isAttacking = false; m_rolling = true; playerCombat.canStunPlayer = false; animator.SetBool("isRolling", true); animator.SetTrigger("Roll"); rb.velocity = new Vector2(m_facingDirection * m_rollForce, rb.velocity.y); allowDodge = Time.time + dodgeCD; //setting cooldown yield return(new WaitForSeconds(dodgeTime)); //dodge duration EnableMove(); animator.SetBool("isRolling", false); playerCombat.canAttack = true; //in case of AttackCancel m_rolling = false; //DELETE: if still using AE_ResetRoll in animation event playerCombat.canStunPlayer = true; }