Advertisement
manolitogamer11111

Roblox Trap Script

Apr 26th, 2020
3,586
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nim 0.29 KB | None | 0 0
  1. local trapPart = script.Parent
  2.  
  3. local function onPartTouch(otherPart)
  4.     local partParent = otherPart.Parent
  5.     local humanoid = partParent:FindFirstChildWhichIsA("Humanoid")
  6.     if humanoid then
  7.         -- Set player's health to 0
  8.         humanoid.Health = 0
  9.     end
  10. end
  11. trapPart.Touched:Connect(onPartTouch)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement