Other ways to make someone slower?

I know you can manipulate a humanoids walkspeed so you slow down, but I’d like to know if there are other ways to slow players down so you can keep the speed you want, but sometimes stop the player from moving too fast.

I know BodyPosition works, but it could be a bit annoying to work with. Anything else you can use that may give a better result?

2 Likes

What would youre use case be to not use walkspeed

2 Likes

Well, you can save the default walkspeed in a variable or any other way, change the walkspeed to slow the player down, then change back to the original walkspeed to reset the player speed.

2 Likes

I’m confused what you’re trying to achieve here? Do you want to manipulate the player into thinking they’re walking slower? If so, you could get a walking animation, and then slow it down along with Humanoids walkspeed.

That’s all I can think of.

1 Like

They’re trying to keep the player walking at the default speed, but want to track if the player moves too fast (ex. speed exploiting or being flung).

1 Like

Can’t you just use an if statement, checking if the player’s walkspeed is above average, which is 16 I think. If it is, kick them?

1 Like

You can use the magnitude property of HumanoidRootPart.Velocity to determine how fast they’re moving in any direction, and if it’s above your defined limit, reduce it. Example:

local rootPart = path.to.character.HumanoidRootPart
local walkSpeed = path.to.character.Humanoid.WalkSpeed

game:GetService("RunService").Heartbeat:Connect(function()
    if (rootPart.Velocity.magnitude > walkSpeed) then
        rootPart.Velocity = rootPart.Velocity / (rootPart.Velocity.magnitude/maxSpeed)
    end
end)

This snippet would scale the character’s velocity down so it never goes faster than the speed you set.

1 Like