i have a brick with a script like this:
script.Parent.Touched:connect(function(hit) if hit and hit.Parent and hit.Parent:FindFirstChild("Humanoid") then wait(.1) hit.Parent.Humanoid.Health = 0 else hit.Destroy() end end)
but whenever something besides a humanoid touches it it wont destroy it
please help
I don't know why your script isn't working, it might be with the way you wrote it. But i rewrote it this way and it works.
function touched(hit) if hit.Parent:FindFirstChild("Humanoid") then hit.Parent.Humanoid.Health = 0 else hit:destroy() end end script.Parent.Touched:Connect(touched)