Advertisement
3DCreator

KillPart Script

Feb 28th, 2021
252
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.26 KB | None | 0 0
  1. local Kills = script.Parent:GetChildren()
  2.  
  3. for i, v in pairs(Kills) do
  4.     if v:IsA("Part") then
  5.         v.Touched:Connect(function(hit)
  6.             local humanoid = hit.Parent:FindFirstChild("Humanoid")
  7.             if not humanoid then return end
  8.             humanoid.Health = 0
  9.         end)
  10.     end
  11. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement