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

Why wont this walking animaton work>?

I want the animation to play when you walk, but it isnt working

Blue squiggly line under humanoid on line 6

local animation = Instance.new("Animation")
animation.AnimationId = "http://www.roblox.com/Asset?ID=########"

game.Workspace.Player.Humanoid.Running:connect(function(speed)
    if speed == 16 then
  		local animTrack = Humanoid:LoadAnimation(animation)
animTrack:Play()
end
end)

1 answer

✓ Accepted answer

Put this in a localscript inside StarterGear:

wait(1)
local AnimationId = "http://www.roblox.com/Asset?ID=########"
local Player = game.Players.LocalPlayer
local Character = Player.Character

Character:WaitForChild("Animate").walk.WalkAnim.AnimationId = AnimationId

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