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

Why wont this make you take damage?

Asked by
qwrn12 85
9 years ago

this is a script that makes the player that touches my left leg take damage. But it doesnt do that and i dont know why


wait(2) local RightLeg = ".Left Leg" local Damage = 0 me = game.Players.LocalPlayer Playa = game.Players.LocalPlayer mouse = me:GetMouse() Torso = me.Character.Torso Head = me.Character.Head Humanoid = me.Character.Humanoid Neck = Torso["Neck"] RightShoulder = Torso["Right Shoulder"] LeftShoulder = Torso["Left Shoulder"] RightHip = Torso["Right Hip"] LeftHip = Torso["Left Hip"] LeftArm = me.Character["Left Arm"] RightArm = me.Character["Right Arm"] LeftLeg = me.Character["Left Leg"] RightLeg = me.Character["Right Leg"] req = 50 -- Damage function Damage1(hit) if hit.Parent:findFirstChild("Humanoid") and hit.Parent.Name ~= me.Name then hit.Parent.Humanoid:TakeDamage(3) wait(.2) end end ---- C MOVE-- PlayzUf = Playa.Name CMoveCD = true mouse.KeyDown:connect(function(Key) if Key == "r" and CMoveCD == true and Humanoid.Jump == false then local animation = Instance.new("Animation") animation.AnimationId = "http://www.roblox.com/item.aspx?id=321445347" local animTrack = Humanoid:LoadAnimation(animation) local Damage = 1 animTrack:Play() wait(2) local Damage = 0 end end) if Damage == 1 then print ("hi") game.Players.LocalPlayer.Character[LeftLeg].Touched:connect(function(Damage1) end) end

Answer this question