How to make player direction based animations

What i want to achieve is to make animations play according to where the player is moving at, like when the player walks forward a forward run animation plays and walking back a walking back animation plays, and also for left and right. Currently i’m not sure how to go about doing it because the player’s humanoid.MoveDirection gives movedirection relative to world space and there were very little topics about it i could find here and on youtube. So if you have any advice on where i could start with this it would be great,

1 Like

You can turn MoveDirection to an object space direction relative to the Player’s HumanoidRootPart by using cf:PointToObjectSpace(cf. Position+Humanoid. MoveDirection). Although, having to constantly check this move direction just to play an animation could probably be a bad practice, so I’m guessing you could just use InputService or ContextActionService to check if a player pressed w, a, s or d and just play the animation assigned to each key.

1 Like