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

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

PREVIOUS NEXT
Code Example
Lua :: tostring lua 
Lua :: roblox difference between index and newindex 
Lua :: lua string to number 
Lua :: roblox get player by name 
Lua :: roblox tween color3 
Lua :: Connect Text Label to Leaderstats 
Lua :: wait function rebuilt in lua 
Lua :: roblox studio color randomizer 
Lua :: lua click button 
Lua :: lua hello world function 
Lua :: print script lua 
Lua :: roblox random number generator 
Lua :: string.match roblox 
Lua :: lua string to date 
Lua :: how to end if statement roblox 
Lua :: finding humanoid roblox. part 
Lua :: lua variables 
Lua :: lua patterns 
Lua :: when do true loop on roblox 
Lua :: roblox lua 
Matlab :: matlab delete file 
Matlab :: octave clear figure 
Basic :: how to send basic auth using fetch 
Basic :: c++ code to c code converter 
Elixir :: elixir join list of strings 
Elixir :: elixir string interpolation 
Scala :: scalable meaning 
Scala :: how to tell what type a variable is scala 
Excel :: excel conditionally highlight multiple columns based on one column 
Perl :: perl for loop 
ADD CONTENT
Topic
Content
Source link
Name
7+6 =