Can I find Players Current Walkspeed?

Hiya! Another Question for the Development Forums!

I want to find Players Speed, either Walkspeed or Studs Per Second (SPS), or something!

I have tried walkspeed, the Property in humanoid, but it is only the maximum walk speed, rather than what the player is walking at that moment.

I have seen some stuff (Aircraft Kits, stuff like that) where they have managed to get “Player Speed”, or Model Speed or something, and this is what I want. I am wondering if it is SPS, or something else, but it’d be good to know if you can help me!

Cheers, AridOats.

2 Likes

For parts you can get Velocity: BasePart | Documentation - Roblox Creator Hub

For players you can get Humanoid and WalkSpeed: Humanoid | Documentation - Roblox Creator Hub

You can also check in studio, when your player is moving go in Humanoid properities and you can see his WalkSpeed change.

Hello! put this code into a local script, you can just put it under starter player scripts. When you test the game, it will print the current speed of the player in the output!

wait(15)
local character = game.Players.LocalPlayer.Character
local currentSpeed = 0
local pos = character.HumanoidRootPart.Position

while true do
    pos = character.HumanoidRootPart.Position
    wait(1)
    currentSpeed = (pos-character.HumanoidRootPart.Position).magnitude
    print(currentSpeed)
end
8 Likes

Thank you! Works perfectly! This is exactly what I need; I will just connect it up to a Value in ReplicatedFirst, then use that to transmit to a GUI!
~ AridOats

4 Likes

Is there a way you could do this using a Touch Event Im having the same Problem but I wanna use a Touch Event to find the players walk speed

That seems fairly easy, just start the process when they touch the block.

No like i mean they need to meet a certain amont of walkspeed like if their walkspeed is 60 then it executes that code if not it dosnt

Ok, let’s move to DMs as we’re clogging the topic.

Couldn’t you also find the .Velocity of the HumanoidRootPart? It would be a bit easier and wouldn’t take up as many lines. Wouldn’t checking the position of the Hrp also count the Y values? (when the player jumps or is falling, the current speed would skyrocket). Here is my example:

local Walkspeed = (Hrp.Velocity * Vector3.new(1,0,1)).Magnitude

You got here just in time didn’t you mate?