I'm using a for loop to apply to all parts in a model. Also, I'd like to ask how to determine if a part is continuing to touch the part.
To have a Touched event trigger, you need to have the part that got touched. E.G
game.Workspace.Part.Touched:connect()
But, for Touched events, it has a parameter that is by default, whatever triggered the event, so:
game.Workspace.Part.Touched:connect(function(h) if h.Parent:FindFirstChild("Humanoid") then h:remove() end end)
TouchEnded is another event, which is fired once the part stops being touched, so:
local touching = false script.Parent.Touched:connect(function() touching = true end) script.Parent.TouchEnded:connect(function() touching = false end)
http://wiki.roblox.com/index.php?title=API:Class/BasePart/Touched