How to match the animation based in the direction the player is moving in?

I made 4 running animations to go Forward, Left, Right, and Backwards, but I have no idea how to get the velocity based of the player so I can smooth them together

[Example]
It runs forward fine but it still runs forward but when I strafe left and right it doesn’t change, so I’m trying to find a velocity relative to the player so I can change it

In Roblox Studio, you can use the BodyVelocity object to apply velocity to a player character (Smooth Velocity?). To achieve smooth movement, you can use RunService.RenderStepped to update the velocity every frame and TweenService to smoothly interpolate the velocity change

I’m not trying to add velocity to the player, I’m trying to get the velocity relative to the player

I found out that I needed to use CFrame:VectorToObjectSpace after realizing that I was searching up the wrong thing all of yesterday

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.