topdown aiming towards mouse in multiplayer

Hello,

I’m making a topdown multiplayer game in which the character follows the mouse.
I used this to make the player aim to the mouse. this works perfectly in singleplayer but in multiplayer the server’s player acts very weird.

I hope somebody can help me with this.

Did you find a solution ?