Syncing and Calculating Animation of Walk OR Run using Player Position

Options
Hi,

I want to calculate(Play) player(Humanoid) animation for walk OR Run using player rate of change of position. (current position and previous position).

Suppose i calculate a (Vector2) for player position. Now i sync this value to server.
No using this value i want the player to play its animation for walk or Run.

It is working locally but not syncing in server. What could be getting wrong

There are some tutorials which tell how to sync animation,
https://youtube.com/watch?v=4AZADiKD2sE

Also photon has one script to sync animation, but it do not works properly some times.


Regards
Unity Learner