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

How to add damage for hurting another people to this script?

Asked by 8 years ago
Edited 8 years ago
01Player = script.Parent.Parent
02    mouse = Player:GetMouse()
03    run = game:GetService("RunService")
04    function onKeyDown(key)
05        script.Disabled = true
06        Key = key:lower()
07        if key == "q" then
08            RightShoulder = Player.Character.Torso["Right Shoulder"]
09            LeftShoulder = Player.Character.Torso["Left Shoulder"]
10            Run = game:GetService("RunService")
11            for i = 1,10 do
12                LeftShoulder.C0 = LeftShoulder.C0 * CFrame.Angles(0,0,0.155)
13                RightShoulder.C0 = RightShoulder.C0 * CFrame.Angles(0,0,0.155)
14                Run.Stepped:wait(0.025)
15            end
View all 26 lines...

1 answer

Log in to vote
0
Answered by 8 years ago

Use the :TakeDamage() method of the Humanoid to apply damage to a player's character.

0
oh yea thx deantay4 10 — 8y
Ad

Answer this question