Charging Attack (platformer)

How do I…

Hello, I want to make a charging attack in my platformer that can charge into a fist that can break certain blocks.

What is the expected result

I want to create an attack that is charged up by holding a key and when released will launch the attack.
To be more specific, I want to make it so the player can hold the z key, then let go to make the player character punch. The punch can be used to attack and break blocks

What is the actual result

I tried making it, but it just won’t work. If I press the z key, the player just stays in the charging state until you move. It won’t throw a punch or anything

Related screenshots

IDK if this is still an issue but for you and others…

Key is released is a subevent of key is pressed Both can’t be true at the same time. So, the released won’t ever be triggered. Try dragging the event back a level meaning make it even with the other events not a subevent.

I’m not saying that this will make your code work. I would use a timer instead of wait. Wait is unpredictable.