|
| 25 May 2013 08:17 PM |
function onTouched() script.Parent:FindFirstChild("Humanoid") if Humanoid ~= nil then Humanoid:BreakJoints() end end script.Parent.Touched:connect(onTouched) |
|
|
| Report Abuse |
|
|
|
| 25 May 2013 08:20 PM |
| Humanoids don't have joints to break. |
|
|
| Report Abuse |
|
|
|
| 25 May 2013 08:22 PM |
So that means this works:
function onTouched() script.Parent:FindFirstChild("Humanoid") if Humanoid ~= nil then Humanoid.Health = 0 end end script.Parent.Touched:connect(onTouched) |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 25 May 2013 08:30 PM |
When I test it on visit.rbxl it's not working. How is that? |
|
|
| Report Abuse |
|
|
|
| 25 May 2013 08:31 PM |
| The output comes up with nothing when I touch the parent of the script. |
|
|
| Report Abuse |
|
|
|
| 25 May 2013 08:33 PM |
function onTouched() script.Parent:FindFirstChild("Humanoid")--You're trying to find a humoin in the brick you touched. if Humanoid ~= nil then Humanoid.Health = 0 end end script.Parent.Touched:connect(onTouched) |
|
|
| Report Abuse |
|
|
| |
|
|
| 25 May 2013 08:35 PM |
That was the script I typed in before :| It's the EXACT same, why isn't it workin'? |
|
|
| Report Abuse |
|
|
|
| 25 May 2013 08:40 PM |
function onTouched(hit) hit.Parent:FindFirstChild("Humanoid") if Humanoid ~= nil then Humanoid.Health = 0 end end script.Parent.Touched:connect(onTouched) |
|
|
| Report Abuse |
|
|
|
| 25 May 2013 09:00 PM |
| Output still says nothin' mate. |
|
|
| Report Abuse |
|
|
btft
|
  |
| Joined: 19 Feb 2011 |
| Total Posts: 1512 |
|
|
| 25 May 2013 09:08 PM |
function onTouched(hit) if hit.Parent:FindFirstChild("Humanoid") then hit.Parent.Humanoid.Health = 0 end end script.Parent.Touched:connect(onTouched)
|
|
|
| Report Abuse |
|
|
Oysi
|
  |
| Joined: 06 Jul 2009 |
| Total Posts: 9058 |
|
| |
|
|
| 25 May 2013 09:13 PM |
function onTouched(part) local a = part.Parent:findFirstChild("Humanoid") if a ~= nil then a.Health = 0 end end script.Parent.Touched:connect(onTouched) |
|
|
| Report Abuse |
|
|
|
| 25 May 2013 09:39 PM |
| Thanks! I just made a free model! |
|
|
| Report Abuse |
|
|