|
| 19 Jan 2013 09:02 AM |
Script.function (Touch)
if Humanoid (Touch) "part" then Humanoid.Damage = -5 wait (1) Humanoid.Damage = -5 wait (1) Humanoid.Damage = -5 wait (1) Humanoid.Damage = -5 wait (1) Humanoid.Damage = -5 wait (1) Humanoid.Damage = -5 wait (1) Humanoid.Damage = -5 wait (1) Humanoid.Damage = -5 wait (1) Humanoid.Damage = -5 wait (1) Humanoid.Damage = -5 wait (1) Humanoid.Damage = -5 wait (1) Humanoid.Damage = -5 wait (1) Humanoid.Damage = -5 wait (1) Humanoid.Damage = -5 wait (1) Humanoid.Damage = -5 wait (1) Humanoid.Damage = -5 wait (1) Humanoid.Damage = -5 wait (1) Humanoid.Damage = -5 wait (1) Humanoid.Damage = -5 wait (1) Humanoid.Damage = -5 end end
im surprised if you read this far |
|
|
| Report Abuse |
|
|
DannyCore
|
  |
| Joined: 25 Apr 2012 |
| Total Posts: 990 |
|
|
| 19 Jan 2013 09:04 AM |
oh my
this is by far the best script ever
jolly good show! |
|
|
| Report Abuse |
|
|
|
| 19 Jan 2013 09:19 AM |
| im surprised if u failed this hard |
|
|
| Report Abuse |
|
|
zars15
|
  |
| Joined: 10 Nov 2008 |
| Total Posts: 9999 |
|
|
| 19 Jan 2013 09:52 AM |
script.Parent.Touched:connect(function(part) if part.Parent:FindFirstChild("Humanoid") then for num=1,10 do part.Parent.Humanoid:TakeDamage(5) wait(1) end end end)
Was that really that hard?! |
|
|
| Report Abuse |
|
|
|
| 19 Jan 2013 09:53 AM |
I never took scripting lessons and I only learned by reading other scripts. And yes it was pretty hard.
im surprised if you read this far |
|
|
| Report Abuse |
|
|
|
| 19 Jan 2013 09:59 AM |
A few errors..
Script doesn't have "function" located anywhere inside of it The if statment is pretty off Your setting the humanoids health (If you were to actually call it) to -5, not make it go down 5.
~ Moo logic = logical logic ~ |
|
|
| Report Abuse |
|
|
|
| 19 Jan 2013 10:04 AM |
Its supposed to be subtracted by 5
im surprised if you read this far |
|
|
| Report Abuse |
|
|
|
| 19 Jan 2013 10:09 AM |
Your script doesn't subtract 5, it just makes health equal to -5.
You gotta do this:
var = var - 5 |
|
|
| Report Abuse |
|
|
Seranok
|
  |
| Joined: 12 Dec 2009 |
| Total Posts: 11083 |
|
|
| 19 Jan 2013 12:13 PM |
Rescripted to handle when parent is nil (yes it happens)
script.Parent.Touched:connect(function(part) if part.Parent then local humanoid = part.Parent:FindFirstChild("Humanoid") if humanoid then for i = 1, 10 do humanoid:TakeDamage(5) wait(1) end end end end) |
|
|
| Report Abuse |
|
|
zars15
|
  |
| Joined: 10 Nov 2008 |
| Total Posts: 9999 |
|
|
| 19 Jan 2013 12:31 PM |
| @seranok. Then you should check if humanoid is still okay within the loop. |
|
|
| Report Abuse |
|
|
FoolHater
|
  |
| Joined: 17 Jul 2008 |
| Total Posts: 2141 |
|
|
| 19 Jan 2013 09:04 PM |
"Script.function (Touch)"
MY EYES!!!!!! |
|
|
| Report Abuse |
|
|
TeamDman
|
  |
| Joined: 04 Dec 2009 |
| Total Posts: 897 |
|
|
| 20 Jan 2013 07:24 AM |
| And the fact that he copypasta'd the lines setting health to -5 didn't burn your eyes with the simple solution of a for loop? |
|
|
| Report Abuse |
|
|