How to get direction player is moving

I am trying to make a script where the player can save and load their position. When loading their position, I want the player to continue moving in the direction they were moving before. For instance, if a player jumped and then saved their state, I would want the player to continue jumping when they load that state. I’ve done a bit of research about Humanoid.MoveDirection, but I’m not sure that would work for what I am trying to accomplish. If anyone could point me in the right direction, I’d greatly appreciate it. Thanks!

I haven’t used MoveDirection I think, at least for this situation. Have you tried using the CFrame’s LookVector?

You can use the HumanoidRootPart to reference, at least that’s what I do. You could also use the Head or just any part. If you have a custom character, and in general, make sure to let the character AutoRotate.

1 Like

When I try to assign the HumanoidRootPart’s LookVector, I get the error: “LookVector cannot be assigned to”

1 Like

yes, this is because the LookVector is ReadOnly. You should assign it like this:

I’m not sure LookVector will work. I need the player to continue moving as they were when they create the checkpoint when they load the checkpoint. When I set the player’s CFrame it they are already facing the correct direction.