Help with a QTE

I'm trying to set up a QTE from a tutorial on the site, but it ends in a failure after the player presses 'OK' to close the text box, without allowing the player to do the QTE. Below is a link to the tutorial, a .txt file of my attempt at it, and a video. Please note that the video is not a representation of how I will be using the QTE in my project, if I decide to use it.
Does anyone know what needs to be changed to make the QTE work as intended?


VIDEO
It's hard to tell what's going wrong since your messages are blank, try adding some random words so you can see what's being triggered. I can't get that to happen in my event, but I'm guessing the spacebar is being hit twice when trying to close the message so the event thinks you failed. One possible fix could be to put a 5-10 frame wait right before the loop starts.
I’ll give that a shot when I get home later, thanks.
For this kind of thing I personally prefer to set up a small loop that breaks on no input just before the main QTE loop. This ensures that relevant buttons are all in a known state when the QTE starts.
Spoiler: Event snippet
Code:
◆Comment:Check button is not being pressed before starting...
◆Loop
  ◆If:Button [OK] is pressed down
    ◆Comment:Check again next frame~
    ◆Wait:1 frame
    ◆
  :Else
    ◆Comment:Button released!
    ◆Break Loop
    ◆
  :End
  ◆
:Repeat Above
◆Comment:Start the QTE!
◆Comment:-- setup, show pictures etc --
◆Loop
  ◆Comment:-- input checks etc --
  ◆
:Repeat Above

Original thread: https://forums.rpgmakerweb.com/threads/help-with-a-qte.132892/