sådan laver man en killBrick

  1. lav en part i workspace
  2. lav en script i part
  3. put den her kode i scripten
local killplayer = true -- controlls if or not you want to kill player or just damage player
local damage = 10 -- the damage if killplayer is false
local db = false -- a debounce

script.Parent.Touched:Connect(function(hit)
	local player = game.Players:GetPlayerFromCharacter(hit.Parent)
	if player then
		if killplayer == true then
			player.Character.Humanoid.Health = 0
		elseif killplayer == false and db == false then
			db = true
			player.Character.Humanoid.Health -= damage
			wait(.1)
			db = false
		end
	end
end)