local part = script.Parent local function onPartTouched(otherPart) local partParent = otherPart.Parent -- Look for a humanoid in the parent local humanoid = partParent:FindFirstChildWhichIsA("Humanoid") -- If the parent has a child of type humanoid, it is a character if humanoid then -- Do something to the humanoid, like set its health to 0 humanoid.Health = 0 end end part.Touched:Connect(onPartTouched)