A simple animation script for my sword isn't working. This is a localscript.
Script:
tool = script.Parent
player = script.Parent.Parent.Parent
Humanoid = player.Character.Humanoid
script.Parent.Activated:connect(function(hit)
local animation = Instance.new("Animation")
animation.AnimationId = "http://www.roblox.com/Asset?ID=217206026"
local animTrack = Humanoid:LoadAnimation(animation)
animTrack:Play()
end)

4 comments
No, when its activated
What does activated mean?
when you equip it and then you click. like tool.Activated:connect(function()
Ok let me fix this. By the way there's no activated event.