Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 8 years ago

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

0
Also, can someone tell me how to add audio when I press the desired button? (in this case "q" Thisnoguest 27 — 8y

1 answer

Log in to vote
-1
Answered by 8 years ago

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()

Ad

Answer this question