You have to use "set platform vector".
I did something like this on my GGJ project earlier this year. It works, but if you want the player to be knocked back depending on the side on which he has been hit, you've got to add some things. This is also kind of a mess because I did it in a hurry.
Here's that bit of code:
Basically what's it saying is:
IF the player has been hit
AND he isn't invicible/blinking
AND the ducking animation isn't playing (he uses a shield when he's ducked)
Deactivate the controls group
Set animation to hit
Set invicible var to 1 (which makes him blink and be invicible for a short period of time)Set platform vector Y to -200
(this makes the player move up, if you want to increase/decrese the size just mess with the number, but it has to be negative for him to go up)
Subtract one from health
If you want to have him be knocked back instead of just up, you have to add the "set platform vector X" too.