of     4   
chevron_rightchevron_rightchevron_right

Nay10
#20635158Saturday, February 06, 2010 10:17 PM GMT

Help please....
BastionGX
#20635218Saturday, February 06, 2010 10:18 PM GMT

script.Parent.Touched:connect(function(_o) pcall(function() _o.Parent['Humanoid']:TakeDamage(100) end) end)
Nay10
#20635243Saturday, February 06, 2010 10:19 PM GMT

thx
Xtreme101
#20636700Saturday, February 06, 2010 10:43 PM GMT

BastionGX is GOOD.
Nay10
#20637216Saturday, February 06, 2010 10:51 PM GMT

ya
LeftAngle
#20637665Saturday, February 06, 2010 10:59 PM GMT

DO not give him these little scripts.He uses it For exploiting .... WTH
CardCaddy
#20637826Saturday, February 06, 2010 11:01 PM GMT

function onTouch(part) if part == nil then return end if part.Parent:FindFirstChild("Humanoid") ~= nil then humanoid = part.Parent:FindFirstChild("Humanoid") humanoid:TakeDamage(humanoid.Health) end end script.Parent.Touched:connect(onTouch) Mine might be easyer to understand if you wana learn somethin from it...
Tuffy123456789
#20638814Saturday, February 06, 2010 11:16 PM GMT

This is the correct. All the other noobs posted the wrong script! function onTouched (hit) local h = findFirstChild("Humanoid") if (h ~= nil) then humanoid.Health = 0 end end script.Parent.Touched:connect (onTouched) There...
CardCaddy
#20665097Sunday, February 07, 2010 10:20 AM GMT

Thats not right... "local h = findFirstChild("Humanoid")"? Yeah... umm... not gona work. Just use mine.
Nineza
#20665322Sunday, February 07, 2010 10:55 AM GMT

Tuffy, don't say they posted the wrong thing if they didn't. If you don't understand the script, don't assume it doesn't work. They're using more advanced scripting than the basic method to make it easier.
H1998
#20665418Sunday, February 07, 2010 11:05 AM GMT

Tuffy, Not correct. Your script is supposed to be: function onTouched (hit) local h = hit.Parent:findFirstChild("Humanoid") -- It must find child of somethin if h ~= nil then return end -- something like that h.Health = 0 end end script.Parent.Touched:connect(onTouched) -- No space
Nineza
#20665512Sunday, February 07, 2010 11:12 AM GMT

It doesn't matter about the space. And I didn't mention about the hit.Parent:findFirstChild("Humanoid") bit because it was already mentioned. =D Wow. Over 600 posts by me. =D
curt9043
#20666049Sunday, February 07, 2010 11:54 AM GMT

function Kill(humanoid) if humanoid~=nil then humanoid:TakeDamage(100) end end script.Parent.Touched:connect(function(part) humanoid = part.Parent:findFirstChild("Humanoid") Kill(humanoid) end)
crazyman32
#20666191Sunday, February 07, 2010 12:03 PM GMT

You guys make it so complicated. It is as simple as this: script.Parent.Touched:connect(function(part) pcall(function() part.Parent.Humanoid.Health = 0 end) end)
curt9043
#20666210Sunday, February 07, 2010 12:05 PM GMT

I prefer my one, as it is easilly editable.
drblue22
#20666762Sunday, February 07, 2010 12:38 PM GMT

guys im a total noob at scripting it just seems so complicated i would love it if you guys could give me a few pointers thx Drblue22
H1998
#20666783Sunday, February 07, 2010 12:39 PM GMT

Nickelodeondude123
#20673450Sunday, February 07, 2010 3:55 PM GMT

function onTouched(part) local h = part.Parent:findFirstChild("Humanoid") if h~=nil then h.Health = 0 end end script.Parent.Touched:connect(onTouched)
Script09
#20673953Sunday, February 07, 2010 4:07 PM GMT

or, you can make a lava brick that 'Dissolves' function t(h) hi = h.Parent:FindFirstChild("Humanoid") if hi~=nil then return end h.Parent:remove() end script.Parent.Touched:connect(t)
H1998
#20725449Monday, February 08, 2010 2:49 PM GMT

Script09, If you use that script the player wont respawn
AncientDinosaur
#20725571Monday, February 08, 2010 2:57 PM GMT

Absolute Kill function wthomgblah(nose) humanoid = nose.Parent:findFirstChild("Humanoid") if humanoid ~= nil then humanoid.MaxHealth = 0 humanoid.Health = 0 if humanoid.Parent ~= workspace then humanoid.Parent:BreakJoints() end end end script.Parent.Touched:connect(wthomgblah)
iamsleepy
#27562988Thursday, June 17, 2010 11:36 PM GMT

yay finnally the right script
Virtuosa
#27564418Thursday, June 17, 2010 11:54 PM GMT

function onTouched (hit) --Function local h = hit.Parent:findFirstChild("Humanoid") -- Find the humanoid of whatever touched it if h ~= nil then return end -- if "h" is not present, then keep listening h.Health = 0 -- if "h" is present, then kill it >:D end end script.Parent.Touched:connect(onTouched) This is the most common one for this purpose...
ghost3541
#27565124Friday, June 18, 2010 12:03 AM GMT

function onTouch(part) if part == nil then return end if part.Parent:FindFirstChild("Humanoid") ~= nil then humanoid = part.Parent:FindFirstChild("Humanoid") humanoid:TakeDamage(humanoid.Health) end end script.Parent.Touched:connect(onTouch) Derr Ya Goez
secretdarkninja
#31296995Tuesday, August 10, 2010 3:05 AM GMT

script.Parent.Touched:connect(function(_o) pcall(function() _o.Parent['Humanoid']:TakeDamage(100) end) end) simple....

    of     4   
chevron_rightchevron_rightchevron_right