How to make player have momentum?

Basically I want to make it so you cant just rapidly spam a and d to strafe and after you stop moving it still carries you in that direction for a bit and you cant turn around rapidly.

  1. Grab the roblox’s movements script
  2. When they move instead of forcing the player to walk you need to add force to their HumanoidRootPart.
  3. You got your movement system.

wdym by that? also how should i add force to the humanoidrootpart

Roblox uses a script themselves to move the player, if you’d copy this and edit it to change the BasePart.AssemblyLinearVelocity of the RootPart then it should work.
Else you could always add a BodyForce, but with this you’d need to get the HumanoidRootPart’s NormalVector then rotate it so it is either on the left or right.

where is this script? what should i change the velocity to?

probably HumanoidRootPart.CFrame.LookVector * 60 or whatever number you want

ok and where is the movement script that roblox uses so i can change it

image
i think its this but ive never messed with movement

yeah i dont really know what parts of the script to change lol

I forgot where the script is exactly placed, but searching on the DevForums will probably work.
I suggest to make the Velocity 5x to 100x stronger depending on how well it moves.

1 Like

perhaps divide it by the current walkspeed too

couldnt find anything on devforum…