local player = game:GetService("Players").LocalPlayer
local character = player.Character
local humanoid = character:WaitForChild("Humanoid")
local anim = Instance.new("Animation")
anim.AnimationId = "rbxassetid://848997334"
function playAnimation(Anim)
local track = humanoid:LoadAnimation(Anim)
track:Play()
end
game:GetService("UserInputService").InputBegan:connect(function(input ,proc)
if not proc then
if input.KeyCode == Enum.KeyCode.F then
playAnimation(anim)
end
end
end)
COMMUNITY QUESTION
Every time I try to make my animation do damage it doesn't work, so what do I need to do?
1 answer
You can't do damage with animation. You can deal damage by Touching an arm so for example
LeftArm.Touched:Connect(function(h)
local H = h.Parent:FindFirstChild('Humanoid')
H.Health = H.Healht - 10
end)
so try changing the script
This discussion is preserved as it was. New answers, comments, and votes are closed.

10 comments
I was able to do it to the dummy, but I don't know how to set it to the player.
What you mean set it by player?
The dummy's left arm hurts me and npcs, but my left arm does not.
And I'm wondering how to make MY left arm hurt people
then do it for you
local player
I know what I need to insert into the code to make it for the dummy, but I don't know what to insert into the code to make it go on the player's arm
local player doesnt worrk
I figured it out, I set it to Player1, but I have to enable it manually. How do I make it do it automatically?
If it's a server script then duh it won't work, add a script that when the animation on the player plays if it touches an arm the find the humanoid and do damage.