Hey there. So assuming that you are using states for different parts of your enemy's behavior (state 1 = idle, state 2 = attack etc.), you can make a new state that would outline the enemy being stunned by the player.
In case this doesn't sound familiar:
https://www.scirra.com/tutorials/1115/a ... latformers