Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

I don't know how to add damage to the punch animation I've made. Can someone help me?

So I have this script, and I just don't know how to make it do damage (sort of what you have in R2D and R2DA)

wait(2)

local player = game.Players.LocalPlayer
local Mouse = player:GetMouse()
Anim = script.Animation

Mouse.KeyDown:connect(function(key)
if key == "q" then
s = player.Character.Humanoid:LoadAnimation(Anim)
s:Play()
end
end)

Help would really be appreciated

1 comment

0

Also, can someone tell me how to add audio when I press the desired button? (in this case "q"

1 answer

✓ Accepted answer

I can tell you how to add audio but first to add damage do this

function damage(Part) Part.Parent.Humanoid:TakeDamage(2)--desired damage end

If you want it to not do that much damage add once you could try adding a debounce Now to add audio all you have to do is put a "sound" in it with this "rbxassetid://000000"put your sound audio in the 0 part then put sound:Play()

This discussion is preserved as it was. New answers, comments, and votes are closed.