Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Humanoid.Running not working correctly. What should I do?

I'm having this weird problem with this event and I don't know why. I'm trying to cancel playing animations but because of this is impossible. Image of the problem

EDIT: I only have this in my code right now:

humanoid.Running:Connect(function(speed)
    if speed > 0 then
        print("Player is running")
    else
        print("Player has stopped")
    end
end)

1 answer

✓ Accepted answer

humanoid.Running fires when the speed of the character moving changes (detects acceleration not the act of running). I imagine the ...build-up time? (the time it takes for the player to transition from walking speed to running speed) has 10 different speeds phases within it. So once the player reaches running speed the event stops firing (until you start slowing down again)

2 comments

0

is there any solution to this?

0

You can read from Humanoid.MoveDirection (https://developer.roblox.com/en-us/api-reference/property/Humanoid/MoveDirection) if its not = 0,0,0 the character is moving.. Alternatively, you could listen for UserInputs (https://developer.roblox.com/en-us/api-reference/class/UserInputService) they aint gonna move unless they are told to! (not completely true but might suit your use?)

This discussion is preserved as it was. New answers, comments, and votes are closed.