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)
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)
Code Example |
---|
Lua :: lua How to remove index from table |
Lua :: roblox what is the difference between index and newindex |
Lua :: lua integer to string |
Lua :: roblox on touch script |
Lua :: roblox how to loop through all players |
Lua :: os.date lua |
Lua :: roblox studio Teleport service not working |
Lua :: roblox random part color |
Lua :: length of table lua |
Lua :: roblox what is humanoid |
Lua :: repeat until lua |
Lua :: lua random number |
Lua :: check lua version |
Lua :: countif excel |
Lua :: lua comments |
Lua :: rhyme api |
Lua :: how to make a day/night script roblox |
Lua :: pico8 draw sprite |
Lua :: how to see greatest value in a table lua |
Lua :: How to use Humanoids in Roblox Lua |
Matlab :: log base 10 matlab |
Matlab :: matlab function without output |
Basic :: vb string to int32 |
Basic :: whats up |
Elixir :: generate random number elixir |
Elixir :: phoenix run test |
Scala :: scala map example |
Actionscript :: reset udemy course |
Excel :: excel highlight rows where column matches text |
Perl :: split perl |