How to stop a player from spamming blueprint code?

No, it’s just that a player would hit it so many times that the sound would play as many times as he/she hit the spacebar.

I’m making a game that has a jump mechanic. The jumping itself is fine, but the sound… not so much. If a player were to spam the space bar (jump key) then they would hear the jump noise repeatedly being played over and over again. Here is my jump code, if it will help:

I would appreciate it if someone could reply soon.
Thank you in advance. --Roboboy258

Is you sound set to loop?

Check if character falling. If so don’t play the sound.

On keypress branch check against “is in air”. If false → jump → sound.

As @MMMarcis suggested:

Wow, I never considered that. I’ll try that.
Thank you!