Search
 
SCRIPT & CODE EXAMPLE
 

LUA

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
Comment

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
Comment

roblox make kill brick

local killBrick = -- index your kill brick here

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

killBrick.Touched:Connect(onTouched)
Comment

roblox make kill brick

local killBrick = -- index your kill brick here

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

killBrick.Touched:Connect(onTouched)
Comment

Roblox Studio Instant Kill Brick Script

function kill(part)
	local humanoid = part.Parent:FindFirstChild("Humanoid")
	if (humanoid ~= nil)  then
		humanoid.Health = 0
	end
end

script.Parent.Touched:connect(kill)
Comment

Roblox Studio Instant Kill Brick Script

function kill(part)
	local humanoid = part.Parent:FindFirstChild("Humanoid")
	if (humanoid ~= nil)  then
		humanoid.Health = 0
	end
end

script.Parent.Touched:connect(kill)
Comment

PREVIOUS NEXT
Code Example
Lua :: luau kill brick script 
Lua :: roblox index and newindex 
Lua :: open popup windows lua 
Lua :: luau debounce 
Lua :: roblox tween 
Lua :: open gui script 
Lua :: lua loop 
Lua :: lua multiline string 
Lua :: keywords in lua 
Lua :: roblox how to get character from player 
Lua :: make string all capital roblox 
Lua :: roblox number generator 
Lua :: what is lua used for 
Lua :: datastore roblox 
Lua :: how to kill humanoid with click detector roblox 
Lua :: FiveM Lua How to create table of all online player id 
Lua :: lua difference between pairs and ipairs 
Lua :: gettable 
Lua :: <font color="" roblox 
Lua :: Simple Roblox Lua Function 
Matlab :: octave disable warning 
Matlab :: print hello world n times in matlab 
Matlab :: zsh corrupt history file 
Basic :: visual basic how to determine if an array already contains an item 
Elixir :: elixir check type data 
Elixir :: elixir anonymous function 
Scala :: hashset scala 
Scala :: scala reverse string 
Excel :: google sheets count dates that fall within date range 
Perl :: perl sprintf YYYYMMDD sample 
ADD CONTENT
Topic
Content
Source link
Name
7+6 =