Server to client variable delay problem

Hi everyone!

I’m trying to improve the animation blueprint for the character concerning it’s jump animation. I want to separate the JumpStart and JumpLoop animations to when the character actually jumps and when he only falls. Currently I have set up a boolean( Jump! ) that gets replicated to the server when the character jumps. The AnimBlueprint event graph then takes Jump! and assigns it to it’s own boolean, which is used in the state machine to decide if the character jumped or not.

The problem I have is that when I jump in-game on a client, the server registers that as a jump ( Jump! is processed as being turned to true), while the client sometimes does and sometimes does not register that as a jump.

What I think is happening is that there is a delay between the server setting the Jump! boolean and then sending it to the client, meanwhile the client already processes the AnimBlueprint event graph and so the Jump! boolean is still false(in the eyes of the client). Sometimes(I think) the client actually catches Jump! , and that’s when the jump happens client-side.

I need help with finding a better way of doing this. How I think I should be going about this: Setting Jump! client-side and then just notifying the server of it happening? Here are the blueprints:

MyCharacter class blueprint:

http://s13.postimg.org/guucgpi52/Problem1_1.jpg

Third person character AnimBlueprint event graph:

http://s27.postimg.org/miq9aaptu/Problem1_2.jpg

Third person character AnimBlueprint state machine:

http://s27.postimg.org/mzbgwqdkz/Problem1_3.jpg

Third person character AnimBlueprint Idle to JumpStart transition:

http://s18.postimg.org/i66dhv5mh/Problem1_4.jpg

Third person character AnimBlueprint Idle to JumpLoop transition:

http://s13.postimg.org/y9j62q4nr/Problem1_5.jpg

Thank you very much for your help,

Solved by getting rid of those Run on Server events in the MyCharacter class blueprint and instead directly setting the boolean(which is replicated) on the client. I’m facepalming myself right now for not trying that earlier, even though I thought I had.