Everything works, but it isn’t playing the animations any clue why?
tool = script.Parent
debounce = nil
function Attack()
if debounce == nil then
print("0")
local anim = tool:WaitForChild("Animation")
local humanoid = script.Parent.Parent:WaitForChild("Humanoid")
local animTrack = humanoid:LoadAnimation(anim)
animTrack:Play()
debounce = true
wait(3)
debounce = nil
end
end
tool.Activated:Connect(Attack)
tool.Handle.HitBox.Touched:Connect(function(hit)
local humanoid = hit.Parent:FindFirstChild("Humanoid")
if humanoid.Parent ~= tool.Parent and debounce == true then
print("1")
humanoid.Health -= 3
end
end)