Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How do you check if a Character is walking?

Asked by 9 years ago

I know that if you check a Humanoid's state you can see if a Character is Jumping or Falling, but when a Character is not moving it still counts them as Running/RunningNoPhysics.

BONUS QUESTION: What is the difference between Running and RunningNoPhysics?

0
That's because Running doesn't check if they're running. It checks for the torso's velocity. EzraNehemiah_TF2 3552 — 9y

1 answer

Log in to vote
1
Answered by 9 years ago

Use the running event.

workspace.Player1.Humanoid.Running:connect(function(speed) --You can also do Humanoid.FreeFalling for falling and Humanoid.Jumping for jumping.
    if speed > 0 then --Walking
        print("Walking")
    elseif speed == 0 then --If speed is 0 then they've stopped walking.
        print("Stopped walking")
    end
end)

I saw your forum post: http://web.roblox.com/Forum/ShowPost.aspx?PostID=157922907. Humanoid.Running does work. Just check if the speed = 0. Running checks for the player's Torso's Velocity. If it's 0 they're not moving. If it's bigger than 0 they're walking.


Hope this helps!

0
Problem is, whenever a player lands it counts them as walking (even if they aren't). ASCIIaliens 20 — 9y
Ad

Answer this question