How do I make my characters use the animation at the set speed?

The code seems ok.

When the character is running it will use the running animation, but when I toggle to use the walking speed, it keeps using the running animation, but with the walk speed.

This means that the toggling is working. The problem must be in the animation BP. Something must be preventing the transition from Run to Walk. Did you have set something special in there?