Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local trapPart = script.Parent
- local function onPartTouch(otherPart)
- local partParent = otherPart.Parent
- local humanoid = partParent:FindFirstChildWhichIsA("Humanoid")
- if humanoid then
- -- Set player's health to 0
- humanoid.Health = 0
- end
- end
- trapPart.Touched:Connect(onPartTouch)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement