Yeah, like @pail said, we need a bit more context. Either way, I fixed up your script.
script.Parent.Touched:Connect(function(hit)
if hit.Parent ~= nil then
print("Worked")
local Humanoid = hit.Parent:FindFirstChild("Humanoid")
Humanoid.Health = 0
end
end)