comiconor
|
  |
| Joined: 26 May 2009 |
| Total Posts: 16893 |
|
| |
|
comiconor
|
  |
| Joined: 26 May 2009 |
| Total Posts: 16893 |
|
| |
|
Fl0x
|
  |
| Joined: 06 Aug 2010 |
| Total Posts: 5169 |
|
| |
|
Fl0x
|
  |
| Joined: 06 Aug 2010 |
| Total Posts: 5169 |
|
|
| 22 Aug 2011 10:05 AM |
h:TakeDamage(h.MaxHealth) Is way better. |
|
|
| Report Abuse |
|
|
|
| 22 Aug 2011 10:07 AM |
Copied from the Wiki much? =P Anyways try this:
Put it in a localscript and remove all 'local' variables. That fixed it for me. |
|
|
| Report Abuse |
|
|
comiconor
|
  |
| Joined: 26 May 2009 |
| Total Posts: 16893 |
|
| |
|
comiconor
|
  |
| Joined: 26 May 2009 |
| Total Posts: 16893 |
|
| |
|
comiconor
|
  |
| Joined: 26 May 2009 |
| Total Posts: 16893 |
|
| |
|
DjDaylan
|
  |
| Joined: 02 Jul 2010 |
| Total Posts: 34 |
|
| |
|
comiconor
|
  |
| Joined: 26 May 2009 |
| Total Posts: 16893 |
|
| |
|
comiconor
|
  |
| Joined: 26 May 2009 |
| Total Posts: 16893 |
|
| |
|
comiconor
|
  |
| Joined: 26 May 2009 |
| Total Posts: 16893 |
|
| |
|
comiconor
|
  |
| Joined: 26 May 2009 |
| Total Posts: 16893 |
|
| |
|
|
| 22 Aug 2011 10:55 AM |
Try this:
Tool = script.Parent User = nil Tool.Equipped:connect(function(mouse) User = Tool.Parent mouse.Icon = "rbxasset://textures\\GunCursor.png" mouse.Button1Down:connect(function() if not script.Parent.Shoot.Value and not script.Parent.Reloading.Value then script.Parent.Shoot.Value = true Ray = Ray.new(Tool.Handle.CFrame.p, (mouse.Hit.p - Tool.Handle.CFrame.p).unit*300) Hit, Position = game.Workspace:FindPartOnRay(Ray, User) if Hit and Hit.Parent:FindFirstChild("Humanoid") then if Hit.Name == "Head" then h:TakeDamage(h.MaxHealth) elseif Hit.Name == "Torso" then h:TakeDamage(75) else h:TakeDamage(25) end end end RayPart = Instance.new("Part", game.Workspace) RayPart.Name = "RayPart" RayPart.BrickColor = BrickColor.new("Bright red") RayPart.Transparency = 0.5 RayPart.Anchored = true RayPart.CanCollide = false RayPart.TopSurface = "Smooth" RayPart.BottomSurface = "Smooth" RayPart.formFactor = "Custom" Distance = (Position-Tool.Handle.CFrame.p).magnitude RayPart.Size = Vector3.new(0.2,0.2,Distance) RayPart.CFrame = CFrame.new(Position,Tool.Handle.CFrame.p) * CFrame.new(0,0,-Distance/2) game.Debris:AddItem(RayPart,0.1) mouse.Icon = "rbxasset://textures\\GunWaitCursor.png" script.Parent.Clip.Value = script.Parent.Clip.Value - 1 wait(2) if script.Parent.Clip.Value > 0 then script.Parent.Shoot.Value = false end mouse.Icon = "rbxasset://textures\\GunCursor.png" end)
~~{I'm a dangerous sociopath with a long history of violence}~~ ~{I don't understand how you keep forgetting that}~ |
|
|
| Report Abuse |
|
|
comiconor
|
  |
| Joined: 26 May 2009 |
| Total Posts: 16893 |
|
| |
|
myrco919
|
  |
| Joined: 12 Jun 2009 |
| Total Posts: 13241 |
|
| |
|
comiconor
|
  |
| Joined: 26 May 2009 |
| Total Posts: 16893 |
|
| |
|
myrco919
|
  |
| Joined: 12 Jun 2009 |
| Total Posts: 13241 |
|
| |
|
comiconor
|
  |
| Joined: 26 May 2009 |
| Total Posts: 16893 |
|
| |
|