How to add a deceleration to player's speed?

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    A way to decelerate a player after they stop moving, maybe slowly reduce velocity until the player is stationary (is that even possible?) or apply a force to the player, add a little slide like ice maybe.

  2. What is the issue? Include screenshots / videos if possible!
    Having trouble applying deceleration to character.

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?

I looked at two topics: Add Acceleration to the Player's Speed? - #14 by DANGERK2
How would I add deceleration to a player's speed?

So far turned up nothing because most of it was confusing to me. Tried setting Velocity to 0 but that did not work at all.

Just checking you want to change the player’s walk speed over a said period of time, right?

1 Like

No, I want the player to slow down after they stop moving like when you stop walking in real life you have a little bit of motion left after you stop moving, something like that. You can observe this “deceleration” in games like Team Fortress 2.

EDIT: sorry that I can’t provide an example right now as I am busy, I will try later.

Quick Update:
I was experimenting with LinearVelocity and it did bear a bit but I scrapped the script entirely as it was unreliable, janky, and just outright useless (mostly because I suck at coding.)

Will let know if I find anything, thanks.

I was having this issue while making a click on object and move player to it. If the character’s walkspeed is too fast, the player will just speed right through the object or bounce off it if the object is collidable. I tried to set the walkspeed to zero when it reaches the goal, but it didn’t work. I also tried to turn off all animations and make the player platformstanding, anchoring the rootpart. The only solution for me was to set a magnitude.

repeat
humanoid:MoveTo(goal) -- goal is a Vector3 position
task.wait()
until (character.PrimaryPart.Position - goal).Magnitude <= 3

This way, when the player is close enough to the object, it will already stop pursuing it, so it makes it slow down before I do any other action to the player like make it play an animation or set its walkspeed.

Right I have decided I will just make my own physics because I have grown sick and tired and I am now currently losing my mind.

alright, you just you just had to SHRINK THE PLAYER.

WHY??? WHY DOES THIS WORK I AM LOSING MY MIND, YOU JUST HAD TO SHRINK THE PLAYER YOU JUST HAD TO SHRINK IT

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