void Update() { if (Input.GetKeyDown(KeyCode.Space) && jumpCount > 0) { moveScript.Jump(rb, jumpForce); jumpCount--; } if (Input.GetMouseButtonDown(0)) { float yMin = playerHeight * 0.25f + transform.position.y - playerHeight / 2.5f; float yMax = playerHeight * 0.75f + transform.position.y - playerHeight / 2.5f; StartCoroutine(punch.AttackOne(yMin, yMax, hitStrength, gameObject, hitDistance, 0, moveScript.facingRight)); } }