I'm trying to make a sword with its one custom animation when slashing, so far I have made the animation work without the sword instead pressing r plays the animation BUT I can't figure out how to fix this issue, so far no error pop ups are confirmed but the animation doesn't play. I need someone to explain to me what happened, not just short sentence answers.
Here's the script
local animation = Instance.new("Animation")
animation.AnimationId = "http://www.roblox.com/Slash-Test-item?id=271296707"
local player = script.Parent.Parent
--local animTrack = player.Humanoid:LoadAnimation(animation)
local tool = script.Parent
tool.Equipped:connect(function(Mouse)
Mouse.Button1Down:connect(function()
print("Slash")
local animTrack = player.Humanoid:LoadAnimation(animation).animTrack:Play()
--animTrack:Play()
end)
end)
Thank you!

5 comments
Okay, I'll try.
When you say Asset ID do you mean the number?
He means, for the base URL of the AnimationID, you should keep it as "/asset/?id=NUMBERSHERE" instead of using the URL given in Roblox Catalog or whatever.
Agh got that but now it says Humanoid is not a valid member of Backpack Any idea?
Found the mistake, the player variable was in backpack so I just removed one parent then added it after local animTrack = player.Parent. Anyway thanks for the help!