Board Thread:Roblox Wiki Talk/@comment-50.138.253.19-20130407215524/@comment-35320132-20180416011933

TheIronRobloxian wrote: Insert this into a brick:

function onTouch(part)

local humanoid = part.Parent:FindFirstChild("Humanoid")

if (humanoid ~= nil) then -- if a humanoid exists, then

humanoid.Health = 0 -- damage the humanoid

end

end



script.Parent.Touched:connect(onTouch)



That basically kills the player whenever the player touches the brick that the script is in





Thanks for the information!