A kill brick is one of the most common hazards in Roblox games. When a player touches it, they take damage or are instantly removed. You'll need a Part, a script, and a basic understanding of the Touched event to make one.

Kill bricks are useful for creating challenge maps, obstacle courses, and danger zones. Let's build one from scratch.

Setting Up the Part

First, create a new Part that will be your kill brick:

  1. In Roblox Studio, click the Part button in the Home tab.
  2. Click in the workspace to place it.
  3. In the Properties panel, give it a name like KillBrick.
  4. Set its size and position where you want it (for example, a floor hazard).
  5. Optional: change its Color or Material to make it look like a hazard (red, spikes, lava texture, etc.).

Make sure CanCollide is enabled if you want players to walk on it, or disable it if you want them to fall through.

Writing the Script

Now add a Script to detect when players touch the brick:

  1. Select your KillBrick part in the workspace.
  2. In the Home tab, click Script (this inserts a Script inside the part).
  3. Delete the default code and replace it with the following:
Script inside KillBrick
local brick = script.Parent

brick.Touched:Connect(function(hit)
    local humanoid = hit.Parent:FindFirstChild("Humanoid")
    
    if humanoid then
        humanoid:TakeDamage(100)
    end
end)

This script does three things:

  • script.Parent refers to the KillBrick itself.
  • Touched:Connect() listens for when something touches the brick.
  • hit.Parent:FindFirstChild("Humanoid") checks if the touching object is part of a character (only characters have a Humanoid).
  • humanoid:TakeDamage(100) removes 100 health (usually instant death since players have 100 health by default).
💡 Tip — The Touched event fires every frame while something is touching the brick. To prevent multiple damage hits, add a debounce (see below).

Adding a Debounce

Right now, if a player stands on the brick, they'll take damage many times per second. A debounce prevents this by adding a cooldown:

Script with debounce
local brick = script.Parent
local debounce = {}

brick.Touched:Connect(function(hit)
    local humanoid = hit.Parent:FindFirstChild("Humanoid")
    
    if humanoid and not debounce[hit.Parent] then
        debounce[hit.Parent] = true
        humanoid:TakeDamage(100)
        
        wait(0.5) -- Cooldown duration
        debounce[hit.Parent] = nil
    end
end)

The debounce table keeps track of which players have recently touched the brick. If they're already in the table, they won't take damage again until the cooldown expires.

Instant Kill Alternative

If you want to instantly remove the player instead of dealing damage, use this version:

Script that destroys the character
local brick = script.Parent
local debounce = {}

brick.Touched:Connect(function(hit)
    local humanoid = hit.Parent:FindFirstChild("Humanoid")
    
    if humanoid and not debounce[hit.Parent] then
        debounce[hit.Parent] = true
        hit.Parent:FindFirstChild("Head"):Destroy()
    end
end)

Destroying the Head part causes the entire character to break apart and vanish. This is faster than dealing damage and works for instant-kill zones.

Customizing Your Kill Brick

Change damage amount: Replace 100 with any number. For example, humanoid:TakeDamage(25) deals only 25 damage, letting players survive if they have armor or buffs.

Add a sound: Insert a Sound into your KillBrick, then play it when the brick is touched:

Adding sound
local brick = script.Parent
local sound = brick:WaitForChild("Sound")

brick.Touched:Connect(function(hit)
    local humanoid = hit.Parent:FindFirstChild("Humanoid")
    
    if humanoid then
        humanoid:TakeDamage(100)
        sound:Play()
    end
end)

Make it only affect players, not NPCs: The Humanoid check already does this. Only character models have Humanoids.

Add a visual effect: Create particles or colors that change when someone touches it. This requires inserting a ParticleEmitter or using Instance.new() in your script.

Common Mistakes

Script is in ServerScriptService instead of the brick: Put the script directly inside the KillBrick Part. If it's in ServerScriptService, use a RemoteEvent to communicate between the script and the brick.

The brick doesn't work at all: Make sure CanCollide is true (or false, depending on your design) and that the brick is in the workspace, not hidden in ReplicatedStorage.

Damage fires too many times: Add a debounce as shown above. Without it, Touched fires continuously while contact is active.

Script errors mention "Humanoid is nil": This means the script is finding non-character objects. The if humanoid then check prevents crashes, but make sure you're only placing the brick where players will touch it.

💡 Tip — Test your kill brick in the game by pressing Play. Walk into it to make sure it damages you correctly. Use the Output window (View → Output) to spot errors.

Next Steps

Once you've mastered the basic kill brick, try:

  • Creating multiple kill bricks with different properties (spike traps, fire, acid, etc.).
  • Adding a respawn system so players come back instead of staying dead.
  • Building a full obstacle course with platforms and hazards.
  • Using Region3 or Raycasting for non-touch-based damage zones.