Walking and running animation playing when not supposed to

So in my game when you walk or run the animation changes but sometimes the run animation is bugged even when you’re idle so it still plays even when you’re just standing still. This doesn’t happen on the client but it happens on the server and other people see you running while standing still, but for you it works perfectly fine. Any ideas on how to fix this?