I can make it happen with and without the script and only happens when I'm closing the message box. The same thing is happening in every level and only with message boxes. I can run around my levels pushing any combination of buttons but nothing really happens.
Is there by chance just a way to pause the game like the message box does? I actually don't need the message boxes, I just really need the action in the game paused so I can bring a sprite that happens to be playing the part of a message box.
To clarify what I'm doing(and I actually haven't managed to get an error on this method), I'm making a function that calls creates a sprite near the player, makes two message boxes, and then deletes that sprite. The sprite that it creates is a message box made in photoshop with a special font and a potrait of the character talking. The two message boxes I make are actually dummy message boxes with a font and font size set with text but all line breaks removed so that it doesn't write anything on the screen but the game action is still paused. If I could just pause the game, I could completely get rid of the message boxes completely and not even worry about this problem (and I would rather use some sort of pause rather than doing that).
I haven't gotton an error with the two message box way of doing things, but I haven't really tried very hard getting an error there. I don't think I have any sprites falling way off the screen, the only initial instances I have are my player sprite and my HUD sprites which don't go anywhere. Everything else is drawn or erased at various points depending on where the player is.
-edit-
If there isn't some sort of pause function, would there be a way to do something like just set my frame rate to 1 and then set it back to 60 when the player presses a button?