How do I set up Root Motion on a Dedicated Server?

I have tried to implement a Root Motion driven climb up animation and have encontered some problems when I use it with a client - dedicated server setup. In this case the server receives the function call that fires a event inside the pawn’s animation blueprint, but the Pawn doesn’t move.

In a client - listen server setup everything works fine. So I assume it has something to do with the dedicated server not rendering anything.

Are there some solutions to this problem or do I have to ditch root motion and define the movement somewhere else (curves?) and apply it seperatly?

Thank you in advance.

I found the answer myself and thought that I should share it in case anyone else has this problem.
All you need to add is the following line of code:

Mesh->MeshComponentUpdateFlag = EMeshComponentUpdateFlag::AlwaysTickPoseAndRefreshBones;