this is my awnser
local trapPart = script.Parent
local function onPartTouch(otherPart)
local partParent = otherPart.Parent
local humanoid = partParent:FindFirstChildWhichIsA("Humanoid")
if ( humanoid ) then
humanoid.Health = 0
end
end
trapPart.Touched:Connect(onPartTouch)

5 comments
how you makes traps alot better?
I don't see anything wrong with this, it's a simple script that seems to work.
ik! how you makes a traps better.
What do you mean by that? Better how?
well! i am very new to scripting