# Double Jump not Working

**URL:** <https://phaser.discourse.group/t/double-jump-not-working/14814>\
**Category:** Phaser 3\
**Created:** [October 3, 2024, 2:04pm UTC](https://phaser.discourse.group/t/double-jump-not-working/14814 "2024-10-03T14:04:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![slvr-dev](https://avatars.discourse-cdn.com/v4/letter/s/bbce88/32.png) [@slvr-dev](https://phaser.discourse.group/u/slvr-dev)\
**Post date:** [October 3, 2024, 2:04pm UTC](https://phaser.discourse.group/t/double-jump-not-working/14814/1 "2024-10-03T14:04:27Z")

</div>

So I´ve been coding with phaser for a while and now I tried to make my first full game, apparently the game doesnt recognize the second input for a double jump, and I dont exactly know why, I tried using this.jump.isDown but that just makes the double jump infinite, and I dont want that, any help is useful ☹

```javascript
            case Phaser.Input.Keyboard.JustDown(this.jump) && this.body.onFloor():
                this.body.setVelocityY(-250);
                this.anims.play('jump', true);
                break;

            case Phaser.Input.Keyboard.JustDown(this.jump) && !this.body.onFloor():
                this.setVelocityY(-250);
                this.anims.stop()
                this.anims.play('jump', true)
                break;

```

---

<div class="post-metadata">

**Author:** ![samme](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/samme/32/5275_2.png) [@samme](https://phaser.discourse.group/u/samme)\
**Post date:** [October 3, 2024, 2:08pm UTC](https://phaser.discourse.group/t/double-jump-not-working/14814/2 "2024-10-03T14:08:22Z")

</div>

`JustDown()` returns true only once per key press, so you should call it only once per update.

```
const jumpJustDown = Phaser.Input.Keyboard.JustDown(this.jump)

```

---

<div class="post-metadata">

**Author:** ![slvr-dev](https://avatars.discourse-cdn.com/v4/letter/s/bbce88/32.png) [@slvr-dev](https://phaser.discourse.group/u/slvr-dev)\
**Post date:** [October 3, 2024, 8:21pm UTC](https://phaser.discourse.group/t/double-jump-not-working/14814/3 "2024-10-03T20:21:51Z")

</div>

That sound logical, thanks! Its working perfectly now
