Search
 
SCRIPT & CODE EXAMPLE
 

LUA

luau 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 return end
	
	humanoid:TakeDamage(humanoid.MaxHealth)
    -- doesn't kill if a ForceField is guarding the Character
end

killBrick.Touched:Connect(onTouched)
Comment

PREVIOUS NEXT
Code Example
Lua :: Lua array add item 
Lua :: roblox what is the difference between __index and __newindex 
Lua :: lua destroy 
Lua :: roblox make debounce 
Lua :: luau loop all players 
Lua :: gfjhhkn roblox 
Lua :: lua for loop 
Lua :: how to exit current scope roblox 
Lua :: creating new functions using script roblox 
Lua :: for i = 1 to n roblox 
Lua :: Startswith function in lua 
Lua :: roblox math.random 
Lua :: how to print a variable in lua 
Lua :: function return lua 
Lua :: how to stop code roblo 
Lua :: table lua 
Lua :: lua table functions 
Lua :: https://web.roblox.com/games/1334669864/Lua-Learning-Bloxy?refPageId=e6fa4d30-3657-463c-b6f0-a32a84183315 
Lua :: Lua dynamic variable name 
Lua :: FiveM how to check where nearest player is 
Matlab :: matlab rlocus 
Matlab :: matlab make last value the first one etc 
Basic :: how to make vbs error message box 
Basic :: NÃO CONSIGO MANDAR UM POST EM VBNET USANDO POSTMAN 
Elixir :: elixir hello world 
Elixir :: elixir strings 
Scala :: new scala project 
Scala :: scala check if seq container true booleans 
Excel :: excel conditionally highlight rows based on column 
Perl :: read a file in perl 
ADD CONTENT
Topic
Content
Source link
Name
1+9 =