function onTouched(Obj)
local h = Obj.Parent:FindFirstChild("Humanoid")
if h then
h.Health = 0
end
end
script.Parent.Touched:Connect(onTouched)
Code Example |
---|
Lua :: if part is touched |
Lua :: luau kill brick script |
Lua :: roblox difference between index and newindex |
Lua :: rgb to hex lua |
Lua :: roblox how to tween part color |
Lua :: roblox tween part |
Lua :: lua table is empty |
Lua :: luau table find |
Lua :: loop true childs roblox |
Lua :: lua find key in table |
Lua :: roblox tweenservice |
Lua :: lua infinite |
Lua :: What is transparency in roblox |
Lua :: lua insert table into table |
Lua :: Lua How to check what index belongs to value |
Lua :: convert number to string lua |
Lua :: while loop lua |
Lua :: how to make auto scroll roblox |
Lua :: lua hash keys |
Lua :: lua text script |
Matlab :: matlab if |
Matlab :: matlab symbolic integration |
Matlab :: how to multiply matrixes in matlab |
Basic :: ogg to mp3 |
Elixir :: elixir defguard |
Elixir :: phoenix ecto query expression |
Scala :: Scala methods |
Scala :: repartition in spark scala |
Excel :: google sheets sort column by element frequency |
Perl :: perl add key to hash |