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

How do I add damage to this melee? I'm not sure what to do.

Asked by 7 years ago

Okay, so I'm trying to add melee to this script. But as I'm not very experienced, I'm not even sure where to begin. This is the script that triggers the animationL

elseif not meleeing and not aiming and not reloading and not firing then
            meleeing = true
            melee:Play()
            wait(.2)
            tool.Handle.hit:Play()
            wait(.6)
            meleeing = false
        end
    end)

This is what I have the setting on whenever melee is activated:

if meleeing and hit and hit.Parent and hit.Parent ~= tagged and hit.Anchored == false then
            tagged = hit.Parent
            hit.Velocity = character.Torso.CFrame.lookVector * 60
            wait(0.5)
            tagged = nil
        end
    end
)

How do I add damage to the effects of the melee?

1
You obviously know how to get the character's torso (line 3), so just use the same knowledge to get the Humanoid. Then, use the TakeDamage method to damage it. Perci1 4988 — 7y
0
Ok, thanks! termanator990 5 — 7y

Answer this question