I want to get the value of the direction the player moves

Can use ‘Calculate Direction’ in the animation blueprint event graph you can use the Velocity and the Character’s rotation. See image below: