How to make it so its the default walking animation only when below walkspeed 16

I have a custom walkspeed set, but the legs dont look good while the characters moving while blocking, i want it so if your character is walking slower, play the default roblox walk, else, play my custom one, but i dont know how to do it, im not very experienced in scripting and i really need help

3 Likes

Do refer to Roblox’s Doc about Scripting Avatar Animations.

As for getting the default Roblox walk animation, my best guess would be to play the game in Studio with the default walk animation selected in your Avatar Editor, and navigate in the Explorer your Player in the Workspace, and open the Animate Script.

From there, just copy and paste the Default Roblox animation for walking!

1 Like

But how would i change inbetween the custom walk and the default one depending on the walkspeed?

can anyone help? character limit

Its pretty difficult as you gotta change the default animation script.

Luckily its been done before

But if you are looking for a function to start modifying I recommend modifying the onRunning function.

--this was my modified version for another project
function onRunning(speed)
        local movedDuringEmote =
            userEmoteToRunThresholdChange and currentlyPlayingEmote and Humanoid.MoveDirection == Vector3.new(0, 0, 0)
        local speedThreshold = movedDuringEmote and Humanoid.WalkSpeed or 0.75
        if speed > speedThreshold then
            local scale = char:GetAttribute("WalkSpeed") or 16.0
            playAnimation("walk", 0.2, Humanoid)
            setAnimationSpeed(speed / scale)
            pose = "Running"
        else
            if emoteNames[currentAnim] == nil and not currentlyPlayingEmote then
                playAnimation("idle", 0.2, Humanoid)
                pose = "Standing"
            end
        end
    end

Also check out community resources for example projects.