I know, i am a very beginner and i tried searching it up on You Tube, so can someone just give my the basic script to copy and paste please?
I cannot make a block kill, I need the basic command please?
2 answers
Although this isn't a request site, I can give you the script.
function onTouch(part)
local humanoid = part.Parent:FindFirstChild("Humanoid")
if (humanoid ~= nil) then
humanoid.Health = 0
end
end
script.Parent.Touched:connect(onTouch) -- put this into a script inside a part
Please accept this as your answer if it helped.
[EDIT]
An administrator wished for me to explain the script.
"local humanoid = part.Parent:FindFirstChild("Humanoid") " - Finds the humanoid and labels it as humanoid inside the script
"if (humanoid ~= nil) then" - Checks if it's actually a humanoid
"humanoid.Health = 0" Sets the health of the humanoid to 0, 'killing' it
2 comments
thank you
Explain it please?
It creates a function called onTouch() it passes the part that is touched into the function, it then creates a local variable for humanoid setting it to find the humanoid that touches it, if the humanoid is not empty then set the humanoid's health equal to 0, then it ends the if and ends the function, lastly script.Parent.Touched:Connect(onTouch) means that it calls the onTouch function when the Parent of this script is Touched.
This answer was posted by Acreos, I am explaining it for M39a9am3r.
function onTouch(part)
local humanoid = part.Parent:FindFirstChild("Humanoid")
if (humanoid ~= nil) then
humanoid.Health = 0
end
end
script.Parent.Touched:connect(onTouch) -- put this into a script inside a part
This discussion is preserved as it was. New answers, comments, and votes are closed.

4 comments
i am not joking, i suck at scripting
http://wiki.roblox.com/index.php?title=Intro_to_Scripting
Also, please do some research next time; this isn't a request site. Our purpose is to help those w/ their scripting problems, and not to give out scripts. If you wish to learn to script, look up tutorials, or reverse engineer.
In other words, at least make an attempt. ;/ I recommend learning to script first before this though, otherwise that wont turn out well.