DeVinci
|
  |
| Joined: 21 Jul 2010 |
| Total Posts: 338 |
|
|
| 14 Apr 2012 08:03 PM |
Not only can you purchase ammo, you can buy damage upgrades to make your weapon more powerful. But it, too, doesn't want to work. >:\
Heres the code:
ball = script.Parent damage = script.Parent.Damage.Value
function onTouched(hit) local humanoid = hit.Parent:findFirstChild("Zombie") if humanoid ~= nil then tagHumanoid(humanoid) humanoid.Health = humanoid.Health - damage wait(.1) untagHumanoid(humanoid) end connection:disconnect() ball.Parent = nil end function tagHumanoid(humanoid) local tag = ball:findFirstChild("creator") if tag ~= nil then local new_tag = tag:clone() new_tag.Parent = humanoid end end function untagHumanoid(humanoid) if humanoid ~= nil then local tag = humanoid:findFirstChild("creator") if tag ~= nil then tag.Parent = nil end end end connection = ball.Touched:connect(onTouched) wait(8) ball.Parent = nil
Theres no damage done... what so ever. |
|
|
| Report Abuse |
|
|
DeVinci
|
  |
| Joined: 21 Jul 2010 |
| Total Posts: 338 |
|
|
| 14 Apr 2012 08:23 PM |
That is a script inside the pistol itself. (Pistol > This Script)
|
|
|
| Report Abuse |
|
|
DeVinci
|
  |
| Joined: 21 Jul 2010 |
| Total Posts: 338 |
|
|
| 14 Apr 2012 09:15 PM |
| Could really use some help... |
|
|
| Report Abuse |
|
|
BEART12
|
  |
| Joined: 22 Oct 2008 |
| Total Posts: 3190 |
|
| |
|
DeVinci
|
  |
| Joined: 21 Jul 2010 |
| Total Posts: 338 |
|
| |
|
|
| 14 Apr 2012 10:41 PM |
the very last line
ball.Parent = nil
shouldn't that be
ball.Parent == nil |
|
|
| Report Abuse |
|
|
DeVinci
|
  |
| Joined: 21 Jul 2010 |
| Total Posts: 338 |
|
| |
|
|
| 14 Apr 2012 10:53 PM |
| well thats all i got, take away super awesome scripters! :P |
|
|
| Report Abuse |
|
|