|
| 03 Nov 2013 12:35 AM |
Im trying to make a lava brick(Kills when hit) I tested but nothing happened when i walked on it
function die(t) if t then if t.Parent:FindFirstChild("Humanoid") then t.Parent:BreakJoints() end end end
script.Parent.Touched:connect(die) |
|
|
| Report Abuse |
|
|
|
| 03 Nov 2013 12:36 AM |
| Forgot to mention im still a noob at scripting.. |
|
|
| Report Abuse |
|
|
poey27
|
  |
| Joined: 21 Jun 2008 |
| Total Posts: 469 |
|
|
| 03 Nov 2013 12:38 AM |
function onTouched(part) local h = part.Parent:findFirstChild("Humanoid") if h~=nil then h.Health = 0 end end script.Parent.Touched:connect(onTouched) |
|
|
| Report Abuse |
|
|
|
| 03 Nov 2013 01:05 AM |
I tried yours and it didnt work:/
|
|
|
| Report Abuse |
|
|
Conmiro
|
  |
| Joined: 13 Oct 2008 |
| Total Posts: 3393 |
|
|
| 03 Nov 2013 01:07 AM |
| Crazy, I tried his and it does work. |
|
|
| Report Abuse |
|
|
|
| 03 Nov 2013 01:10 AM |
| Hm i prob typed something wrong from his..Im trying to get used to the typing part..I shall try copy and paste |
|
|
| Report Abuse |
|
|
| |
|