Hi,

Some parts of your code are confusing which is probably why you have some bugs in it. First of, what is 'my.status'? A defined skill? Something like my.STATE would be more clearer I think.
Also remove the 2nd while, and place the animation code in the first while. Because now only code in your 2nd while is running every frame. Now you mention that than the anim code is not running properly in the 1st while, my quess this is because either you have some 'break;' that breaks the while loop OR 'my.status' is not equal to 'scorpion_dead' and so the 1st while stops running.
So debug both my.status and scorpion_dead every frame and see what happens with them.
Also there is no wait(1); for the 1st loop.