Part hp is broken

So i have a part with script that detects if a tool touches it, but it also works if an humanoid touches it please help

script.Parent.Touched:connect(function(hit)
	if hit.Name == "Handle" then
		script.Parent.Value.Value = script.Parent.Value.Value - 1
	end
end)

i dont want the part to be touched by a humanoid

Try adding something like if hit.Name == "Handle" and hit.Parent:IsA("Tool") then

1 Like

you could check if the hit.Parent is a Tool

Like this fellow member said. Try it out

2 Likes