Actually it's that neither of them are waiting for the right amount of time.
Firstly, the Wait: directive pauses for the amount of time since the last wait: command was started. In this case, it's the message box. So while you're reading the message box the seconds are already counting down.
The reason for this is so stroke events happen at the rate they were recorded, not the rate they can play back on a fast or slow computer.
To make the script work correctly you should insert a Wait: 0 immediately after the message box (which will be hit immediately), then a Wait: 5 after that:
Unfortunately.... there's a bug in the scripting engine with Wait: (rSeconds)
I made a late change to the way bracketted expressions are parsed, which fixed a couple of bugs and added that one. So for the moment Wait: (variable) wont work, but it will in the next build.
With such a large update, there are bound to be some other bugs show up, so we'll be doing a point release fairly quickly to catch them.
AndyRage's mantra for graphics engine code:
"Sure - how hard can it be?"