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

Is it possible to have multiple "walking" animations play?

Asked by 6 years ago
Edited 6 years ago

In my game, you gradually gain acceleration as you move. I have made the animations, and here is what the animation script (located in the ServerScriptService) looks like:

game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(char)

char.Animate.idle.Animation1.AnimationId = "http://www.roblox.com/asset?id=1832739903"
char.Animate.idle.Animation2.AnimationId = "http://www.roblox.com/asset?id=1836670000"
char.Animate.jump.JumpAnim.AnimationId = "http://www.roblox.com/asset?id=1317819261"
char.Animate.sit.SitAnim.AnimationId = "http://www.roblox.com/asset?id=1591159861"

    game:GetService("RunService").Heartbeat:Connect(function()
        if workspace.Speed.Value < 95 then
            char.Animate.fall.FallAnim.AnimationId = "http://www.roblox.com/asset?id=1124827969"
        else
            char.Animate.fall.FallAnim.AnimationId = "http://www.roblox.com/asset?id=1591030622"
        end

        if workspace.Speed.Value < 60 then
            char.Animate.walk.WalkAnim.AnimationId = "http://www.roblox.com/asset?id=2199510468"
        else
            char.Animate.walk.WalkAnim.AnimationId = "http://www.roblox.com/asset?id=1590889191"
        end
    end)
    end)
end)

The problem here is that I need to jump in order for the animation to update. Without changing the HumanoidStateType, is there any way I can update the animation while still moving?

Answer this question