I get a error when i run this please help me
local player = game:GetService("Players").LocalPlayer
local character = player.Character
local animation = script.Parent:FindFirstChild("Animation")
local swingAnimation
local canSwing = true
local debounce = 1
swingAnimation = character.Humanoid:LoadAnimation(animation)
script.Parent.Activated:Connect(function()
if canSwing then
canSwing = false
swingAnimation:Play()
wait(debounce)
canSwing = true
end
end)

4 comments
Maybe try character:WaitForChild("Humanoid") ?
ok thx
YES OMG IT WORKS TYT
lol don't underestimate WaitForChild