Glocks
|
  |
| Joined: 12 Jun 2009 |
| Total Posts: 647 |
|
|
| 07 Dec 2011 04:30 PM |
This works but every time I touch the part it adds more fire too my torso. I need it to where if there is fire there already then dont add fire when I touch the brick.
I tried this on line 5 if hum and hit.Parent:findFirstChild('Fire') == nil then but it doesn't work
bin = script.Parent
function touch(hit) local hum = hit.Parent:findFirstChild('Humanoid') if hum then f = Instance.new('Fire') f.Parent = hit.Parent:findFirstChild('Torso') while hum.Health > 0 do wait(2) hum.Health = hum.Health - 5 end end end
bin.Touched:connect(touch) |
|
|
| Report Abuse |
|
|
|
| 07 Dec 2011 04:33 PM |
Im assuming bin is a part so after the human check add this line:
if hum.Parent.Fire==nil then |
|
|
| Report Abuse |
|
|
Glocks
|
  |
| Joined: 12 Jun 2009 |
| Total Posts: 647 |
|
|
| 07 Dec 2011 04:35 PM |
would it be this? cause the fire is in the Torso if hum.Parent.Torso.Fire == nil then
|
|
|
| Report Abuse |
|
|
Glocks
|
  |
| Joined: 12 Jun 2009 |
| Total Posts: 647 |
|
| |
|