how to make the enemy stop moving while shooting

in my game V.I.P.E.R. 01 I am making the moving robots that will shoot at you does anyone know how to make it where when they shoot they are not moving but when it is not shooting it is moving?

Oh Yes I Do I’ll Create A Game For That And You Can Copy It Or If You Want To Do It Yourself Just Use A Switch Attach The Switch To The Movement Of The Enemy Make Sure It Is On. Then When The Enemy Shoots It Turns The Switch To Off Making The Input Of The Movement Not Go Through This Will Make Him Not Move Then When He’s Done Shooting Make The Switch Turn Off

Here A Made It In 5 Min Just Look At The Players Behaviors https://flowlab.io/html5/bin/1361876

If you still need help,
then leave a link to the game with what you want to stop when shooting.