So I'm pretty sure I have the problem fixed. I found out it wasn't happening when I randomly pressed buttons or held the over key, it was happening when I didn't kill the first few enemies and then had a function right by my message box function that erased all my enemies in the level. So it's fixed now (I hope

), I just split the functions up so they're activated separately and everything seems to be working fine.
Thanks for all the help!