Create an object for the projectile you are shooting.
Go into the properties of your enemy and create an event for colliding with the projectile.
Drag in the grey movement action and set the direction to direction and the movement to 0. This will make the guard stop when the object hits them.
Drag in an alarm action under main 2 and set the time to whatever you think is a good time to be frozen. (Remember, 30 steps is one second)
Make an event for an alarm corresponding to the action alarm you made.
Drag in the grey movement action and set the direction as direction and the speed as the speed of the enemy originally. This will make the enemy return to movement after the alarm goes off!
Test your game!