I didn't think this would work, but I don't know any other way... How can i get it to play the animation when it is swung? Here is my script
function onEquip()
local animation = script.Slash
print("loading")
local plyr = script.Parent.Parent.Parent.Name
print(plyr)
local char = workspace[plyr]
local anim = char.Humanoid:LoadAnimation(animation)
print("loaded")
function onSwing()
print("swinging")
anim:Play()
end
print("swung")
end
script.Parent.Equipped:connect(onEquip)
script.Parent.MouseButton1Down:connect(onSwing)
MouseButton1Down is not a valid member of Tool Please help!!! Thank you!!!

1 comment
That didn't work, it says MouseButton1Down is not a valid member of Tool