this is how ive always done it.
create a boolean called “disable movement”
in your movement access or really any input you want disabled during the “stun state” just put a branch there that says if disable movement is true, do nothing, otherwise proceed. You can get in the habit of adding it to any new inputs you’d want disabled.
Whenever you want to “stun” the character, just set disable input to true. Nothing will work. Then delay for 4 seconds and set it to untrue.
I have a function called “DisableOffDelay”. After setting disable to true, I immediately run a timer with a time of however long the stun is and then the timer automatically takes the disable movement off with the function. Saves the thread from having to delay processing(using delay node). Instead it completes and the timer then runs the delay off.
You can couple this with a small Launch Character to set them back and stun them. Also good for allowing animations to play. etc…
good luck.