Roblox kill brick script

A part that resets any player who touches it — the building block of every obby. Copy the script, then pick the variation you need.

ScriptUpdated November 2, 2026

Where to put it

Script — Inside the part (Workspace > KillBrick > Script). It runs on the server, so players can't change what it does.

  1. Insert a Part, make it red or neon so players can see the danger, and set Anchored to true.
  2. Insert a Script inside the part and paste the code.

The script

Inside the part (Workspace > KillBrick > Script)
local part = script.Parent

part.Touched:Connect(function(hit)
	local humanoid = hit.Parent:FindFirstChildOfClass("Humanoid")
	if humanoid then
		humanoid.Health = 0
	end
end)

How it works

  • Touched fires when any part touches the brick, including a player's foot or hand.
  • hit.Parent is the character model; if it has a Humanoid, it's a player or NPC.
  • Setting Health to 0 kills the character, and Roblox respawns the player.

Variations

Damage instead of instant death

Deals 20 damage at most once per second per character, so standing on it hurts without killing instantly.

local part = script.Parent
local DAMAGE = 20
local recentlyHit = {}

part.Touched:Connect(function(hit)
	local character = hit.Parent
	local humanoid = character:FindFirstChildOfClass("Humanoid")
	if humanoid and not recentlyHit[character] then
		recentlyHit[character] = true
		humanoid:TakeDamage(DAMAGE)
		task.wait(1)
		recentlyHit[character] = nil
	end
end)

One script for every kill brick

Tag all deadly parts Kill (Properties → Tags) and put this Script in ServerScriptService instead of a script in each part.

local CollectionService = game:GetService("CollectionService")

local function makeDeadly(part)
	part.Touched:Connect(function(hit)
		local humanoid = hit.Parent:FindFirstChildOfClass("Humanoid")
		if humanoid then
			humanoid.Health = 0
		end
	end)
end

for _, part in CollectionService:GetTagged("Kill") do
	makeDeadly(part)
end
CollectionService:GetInstanceAddedSignal("Kill"):Connect(makeDeadly)

Common mistakes

  • Using a LocalScript — it won't run inside a part in Workspace. Use a normal Script.
  • Forgetting Anchored: the brick falls through the map when the game starts.
  • Copying the script into 200 parts. Use the tagged version so a fix applies everywhere.

FAQ

Why doesn't my kill brick work?

Check that it is a Script (not a LocalScript), that it sits inside the part, that the part's CanTouch is on, and look for red errors in the Output window.

Should I use Humanoid.Health = 0 or BreakJoints?

Setting Health to 0 is the clear, supported way. It triggers the normal death and respawn.

Keep reading