Answers for "roblox how to make a kill brick"

Lua
2

roblox kill brick script

function onTouched(part)
	local h = part.Parent:findFirstChild("Humanoid")
	if h~=nil then
		h.Health = h.Health-100
	end
end
script.Parent.Touched:connect(onTouched)
-- Put this in the part you want it to work in
-- Message me for anymore help #Muppet6931
Posted by: Guest on February-26-2021
7

roblox how to make a kill brick

local killBrick = -- index your kill brick here

local function onTouched(hit)
	local humanoid = hit.Parent:FindFirstChild("Humanoid")
	if humanoid ~= nil then
		humanoid:TakeDamage(humanoid.MaxHealth)
    	-- doesn't kill if a ForceField is guarding the Character
	end
end

killBrick.Touched:Connect(onTouched)
Posted by: Guest on May-07-2022
1

kill brick script roblox

function onTouched(Obj)
	local h = Obj.Parent:FindFirstChild("Humanoid")
	if h then
		h.Health = 0
	end
end

script.Parent.Touched:Connect(onTouched)
Posted by: Guest on May-30-2021

Code answers related to "roblox how to make a kill brick"

Browse Popular Code Answers by Language