01 | Player = 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.C 0 = LeftShoulder.C 0 * CFrame.Angles( 0 , 0 , 0.155 ) |
13 | RightShoulder.C 0 = RightShoulder.C 0 * CFrame.Angles( 0 , 0 , 0.155 ) |
14 | Run.Stepped:wait( 0.025 ) |
15 | end |
Use the :TakeDamage()
method of the Humanoid to apply damage to a player's character.