Movement Replication Question

Hey guys, I am just beginning looking at Replication and networking in general.

I am working on a game with a lot of RPG systems such as buffs, debuffs, stats, crowd control, etc., and part of that is implementing checks before my character can move/jump to make sure I am not rooted or stunned when I try to move/jump.

My question is this:
The character movement component replicates moving and jumping without me having to do anything, as part of whatever it does behind the scenes. However, if I want to check these variables before moving, I need to check on the server which means calling an RPC and then reporting back to my character with a Run on Server event to actually input the movement if it returns true. This works fine, but as soon as I start adding any lag it gets to be a significant delay on movement and jump input that feels really bad. How do I go about making my character do this clientside while checking on server to make sure it was okay that I did that, and snapping back if I wasn’t supposed to be able to move (to prevent cheating by bypassing crowd control on the client somehow)?

Here is my BP that works in singleplayer (and works in multiplayer as well, but doesn’t check for crowd control on the server, only on the client).

here’s a good tutorial series: 🎮 UE4 Replication - Part 2: Game Instances - YouTube
he covers sprinting in video number 2 (link above)

That’s a good question.
What I’ve seen some games do is they show the attack/effect/spell playing on the Client side immediately, but the resulting explosion/healing/whatever doesn’t happen until the server responds and says “OK I just did that thing.”
Likewise with movement, then the Client can try to cheat by moving when they’re not supposed to be by hacking their client side isAllowedToMove variable (or whatever you called it), but the server will put them back in the last known server location they were at when the rooting effect hit them, any time it replicates to the client.

Combining these two rules, then the cheating client may appear to be getting somewhere and doing something they see their character moving and casting the spell), but the server will grab them and put them back where they belong, and will refuse to create any of the effects of the spell, so it amounts to nothing more than a fireworks show for the client and they’re right back where they started.