Player = script.Parent.Parent mouse = Player:GetMouse() run = game:GetService("RunService") function onKeyDown(key) script.Disabled = true Key = key:lower() if key == "q" then RightShoulder = Player.Character.Torso["Right Shoulder"] LeftShoulder = Player.Character.Torso["Left Shoulder"] Run = game:GetService("RunService") for i = 1,10 do LeftShoulder.C0 = LeftShoulder.C0 * CFrame.Angles(0,0,0.155) RightShoulder.C0 = RightShoulder.C0 * CFrame.Angles(0,0,0.155) Run.Stepped:wait(0.025) end for i = 1,10 do LeftShoulder.C0 = LeftShoulder.C0 * CFrame.Angles(0,0,-0.155) RightShoulder.C0 = RightShoulder.C0 * CFrame.Angles(0,0,-0.155) Run.Stepped:wait(0.025) end end script.Disabled = false wait(0.1) end mouse.KeyDown:connect(onKeyDown)
Use the :TakeDamage()
method of the Humanoid to apply damage to a player's character.