|
| 02 Apr 2013 07:39 PM |
local player = game.Players.LocalPlayer
function onTouch(connect) if player.Character.Head.Humanoid ~= nil then player.Character.Head.Humanoid.Health = 0 end end
script.Parent.Touched:connect(onTouch)
Support This: http://www.roblox.com/Forum/ShowPost.aspx?PostID=93640170 |
|
|
| Report Abuse |
|
|
noah
|
  |
| Joined: 11 Sep 2006 |
| Total Posts: 18977 |
|
|
| 02 Apr 2013 07:42 PM |
| that argument in that function is useless since you defined player |
|
|
| Report Abuse |
|
|
shawnyg
|
  |
| Joined: 21 Apr 2011 |
| Total Posts: 1428 |
|
|
| 02 Apr 2013 07:47 PM |
You are trying to do a kill script I see. Use this instead
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 |
|
|
|
| 02 Apr 2013 07:52 PM |
thanks.
Support This: http://www.roblox.com/Forum/ShowPost.aspx?PostID=93640170 |
|
|
| Report Abuse |
|
|