There is nothing wrong with the animation. Only the damage part is wrong
player = game.Players.LocalPlayer
animation = script:WaitForChild("Animation")
enabled = true
ra = player.Character:WaitForChild("Right Arm")
dmg = script.Damage.Value
game:GetService("UserInputService").InputBegan:connect(function(input,proc)
if input.KeyCode == Enum.KeyCode.Q then
if enabled then
enabled = false
function onTouch(ra)
local humanoid = ra.Parent:FindFirstChild("Humanoid") --Im not sure if the humanoid is being properly indentified
if humanoid ~= nil then
humanoid.Health.Value = humanoid.Health.Value - dmg -- Where the damage won't work
end
ra.Touched:connect(onTouch)
end
local animationTrack = player.Character.Humanoid:LoadAnimation(animation)
animationTrack:Play()
wait(0.5)
enabled = true
end
end
end)

1 comment
How would you make the script punch from both hands?