The code detects the player first if its touched it. And then it detects if the name of the hit is the head yet sometimes it kills me when the head isnt touching the killbrick .. Heres the script(its in a function)
~~~~~~~~~~~~~~~~~ function module.waterchecktouch(map) local water = map:GetChildren()
for i = 1, #water do if water[i]:FindFirstChild("_iswater") then water[i].Touched:connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") then if hit.Name == "Head" then hit.Parent.Humanoid.Health = 0 end end end) end end
end~~~~~~~~~~~~~~~~~