I am currently scripting a sword. I am trying to make it play a swing animation when it is used. It won't play the animation.
local canHurt = true
script.Parent.Activated:Connect(function()
if canHurt == true then
canHurt = false
local hum = game.Players.LocalPlayer.Character:WaitForChild("Humanoid")
local swing = hum:LoadAnimation(script.Parent.Swing)
swing:Play()
wait(1)
canHurt = true
end
end)

2 comments
any output erros?
None