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

Custom Walking Animation not Working?!

Asked by 9 years ago

I have a problem. So I made a custom walking animation and it works when idling but when I'm walking nothing happens. Here is the code:

Game.Players.PlayerAdded:connect(function(player)
    while not player.Character do wait() end
    local character = player.Character
    local animateScript = character.Animate
    animateScript.walk.Animation1.AnimationId = 'http://www.roblox.com/asset/?id=211400668'
end)

Please help! I really like this custom animation (By the way the location of it is: games.ServerScriptService.Script )

0
I made a mistake. I've updated my answer. The mistake was a syntax error. Be sure to check the output & the script analysis pane, because they check the potential errors of your scripts. Redbullusa 1580 — 9y

1 answer

Log in to vote
0
Answered by
Redbullusa 1580 Moderation Voter
9 years ago

Please put your code in the code block next time.

There's one immediate error that appears in your script:

The walk value does not have a child named as Animation1. It is named as WalkAnim, unless if you changed the name of the animation. The idle object is the only thing that contains two animation, of which are named as "Animation1" and "Animation2".

game.Players.PlayerAdded:connect(function(player)
    while not player.Character do
        wait()
    end
    local character = player.Character
    local animateScript = character:WaitForChild("Animate") -- Some ':WaitForChild()s' just in case.
    animateScript:WaitForChild("walk"):WaitForChild("WalkAnim").AnimationId = 'http://www.roblox.com/asset/?id=211400668'
end)
0
@Redbullusa doesn't work. But thanks for trying to help! rarepreston12 5 — 9y
0
Thanks it works now :D rarepreston12 5 — 9y
Ad

Answer this question