hawk2eye
|
  |
| Joined: 03 May 2010 |
| Total Posts: 8525 |
|
|
| 27 Sep 2014 04:49 AM |
What do I need to add to the lines and where to make the gun damage the zombie as well? If you do help thanks, if not just don't make any witty remarks thanks.
function Fire(Mouse) local Spread = CFrame.Angles(math.rad(math.random(-Settings.Spread, Settings.Spread)/10), math.rad(math.random(-Settings.Spread, Settings.Spread)/10), math.rad(math.random(-Settings.Spread, Settings.Spread)/10)) local Ray = Ray.new(Character.Head.Position, (CFrame.new(Character.Head.Position, Mouse.Hit.p) * Spread).lookVector.unit * Settings.Range) local Hit, Pos = Workspace:FindPartOnRayWithIgnoreList(Ray, Ray_Ignore) if Hit and Hit.Parent:FindFirstChild("Humanoid") and Hit.Parent:FindFirstChild("Zombie")then local Hit_Player = game.Players:GetPlayerFromCharacter(Hit.Parent) if Settings.AntiTK and Hit_Player.TeamColor == Player.TeamColor then return end local Humanoid = Hit.Parent.Humanoid local c = Instance.new("ObjectValue") c.Name = "creator" c.Value = Player game.Debris:AddItem(c, 3) c.Parent = Humanoid if Hit.Name == "Head" then Humanoid.Health = Humanoid.Health - math.random(Settings.HeadShotDamage[1], Settings.HeadShotDamage[2]) else Humanoid.Health = Humanoid.Health - math.random(Settings.Damage[1], Settings.Damage[2]) end
|
|
|
| Report Abuse |
|
|
hawk2eye
|
  |
| Joined: 03 May 2010 |
| Total Posts: 8525 |
|
| |
|
hawk2eye
|
  |
| Joined: 03 May 2010 |
| Total Posts: 8525 |
|
| |
|
|
| 27 Sep 2014 05:20 AM |
| Why did you create another post? |
|
|
| Report Abuse |
|
|
hawk2eye
|
  |
| Joined: 03 May 2010 |
| Total Posts: 8525 |
|
|
| 27 Sep 2014 05:22 AM |
| I was told I had a misleading title on the other so here I am. |
|
|
| Report Abuse |
|
|
hawk2eye
|
  |
| Joined: 03 May 2010 |
| Total Posts: 8525 |
|
| |
|
FoLBot
|
  |
| Joined: 08 May 2014 |
| Total Posts: 168 |
|
|
| 27 Sep 2014 06:47 AM |
| Check the other one. I fixed your problem |
|
|
| Report Abuse |
|
|