Animation sliding

Hi, I made a simple blendspace for my character but all my animations (especially walk and left/right strafes) are sliding I mean they’re not in sync with the movement of the character .I found that I should calculate play rate from speed in animation blueprint and set it to my blendspace but I don’t think I understood very well how to do it so I hope someone can explain to me what I should do to fix this annoying problem because there are no tutorial and I’m stuck.
Thanks in advance