I'm trying to Google a guide on how to play animations, but all I am getting are stupid videos and guides for the animation hack.
All I want to do is make a running animation play in my place when a player runs. I have done this but it's not working. It's frustrating me so badly:
ani = Instance.new("Animation") ani.AnimationId = "http://www.roblox.com/asset/?id=125749145" ani.Name = "Run" animTrack = script.Parent.Humanoid:LoadAnimation(ani) local isWalking = false script.Parent.Humanoid.Running:connect(function(speed) if (speed > 0) then isWalking = true animTrack:Play() else isWalking = false animTrack:Stop() end end)
A possible problem you may be experiencing is that the default animation script is overriding yours when you walk. You could consider temporarily disabling the Animate script while yours plays.
I think you should just switch the run animation ID when they join. Like this:
game.Players.PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(function(character) wait(1) -- Cooldown for parts to load in character.Animate.run.RunAnim.AnimationId = "http://www.roblox.com/asset/?id=125749145" -- Switches animation ID end) end)
Have a happy Christmas! :D
Shouldn't the ID just be the number after the "id=" part of the URL?