Miro034
|
  |
| Joined: 07 Oct 2009 |
| Total Posts: 6568 |
|
|
| 26 Aug 2011 06:22 AM |
function Hit(hit) local human = hit.Parent:FindFirstChild("Junk") if human ~= nil then human.Health = human.Health -15 end end
larm.Touched:connect(Hit) rarm.Touched:connect(Hit)
It won't work how come? I edited/made it and it didnt work!! OMG How come? |
|
|
| Report Abuse |
|
|
NilPirate
|
  |
| Joined: 31 Jul 2010 |
| Total Posts: 3077 |
|
|
| 26 Aug 2011 06:25 AM |
| The game doesn't know what larm and rarm are yet. |
|
|
| Report Abuse |
|
|
|
| 26 Aug 2011 06:26 AM |
I'm not sure if this will work, but:
local human = hit.Parent:FindFirstChild("Junk")
function Hit() if human ~= nil then human.Health = human.Health -15 end end
script.Parent.Touched:connect(onTouch)
I'm sort of just a moderate scripter, but I can make useful scripts. |
|
|
| Report Abuse |
|
|
NilPirate
|
  |
| Joined: 31 Jul 2010 |
| Total Posts: 3077 |
|
|
| 26 Aug 2011 06:27 AM |
human = hit.Parent:FindFirstChild("Junk")
function Hit() if human ~= nil then human.Health = human.Health -15 end end
script.Parent.Touched:connect(onTouch)
I'm pretty sure a local would make human out of scope for Hit() |
|
|
| Report Abuse |
|
|
Miro034
|
  |
| Joined: 07 Oct 2009 |
| Total Posts: 6568 |
|
| |
|
| |
|
Miro034
|
  |
| Joined: 07 Oct 2009 |
| Total Posts: 6568 |
|
| |
|
verpy12
|
  |
| Joined: 13 May 2010 |
| Total Posts: 1737 |
|
| |
|
|
| 27 Aug 2011 06:19 PM |
| Miro, yes I did you liar! =3 |
|
|
| Report Abuse |
|
|
Miro034
|
  |
| Joined: 07 Oct 2009 |
| Total Posts: 6568 |
|
|
| 27 Aug 2011 06:38 PM |
| What did you write? I don't see a post.. |
|
|
| Report Abuse |
|
|
bluepen16
|
  |
| Joined: 13 Nov 2008 |
| Total Posts: 1870 |
|
|
| 27 Aug 2011 06:41 PM |
local human = hit.Parent:FindFirstChild("Junk") function Hit() if human ~= nil then human.Health = human.Health -15 end end
script.Parent.Touched:connect(Hit)
If this doens't work I got nothing. |
|
|
| Report Abuse |
|
|
Miro034
|
  |
| Joined: 07 Oct 2009 |
| Total Posts: 6568 |
|
|
| 27 Aug 2011 06:57 PM |
Ok guys I already figured it out..hx by the ways GUYS
========================THREAD ENDED===================== |
|
|
| Report Abuse |
|
|
|
| 28 Aug 2011 12:40 PM |
| I like to shake my junk! =3 |
|
|
| Report Abuse |
|
|
Miro034
|
  |
| Joined: 07 Oct 2009 |
| Total Posts: 6568 |
|
|
| 28 Aug 2011 02:16 PM |
| go ahead...Last post EVERYBODY!! |
|
|
| Report Abuse |
|
|