Hi. I have this script below. However, for whatever reason, it isn't working. Nothing is getting killed at all, and I am very confused. Basically, I want a specific model to not be killed by the script.
function touch(part)
if part.Parent:FindFirstChild("Humanoid")~=nil then
if part.Parent.Name ~= "name of thing excluded from kill" then
hit.Parent:FindFirstChild("Humanoid").Health=0
end
end
script.Parent.touched:connect(touch)
What did I do wrong?

4 comments
Doesn't seem to work, for some reason
Oof, can you please tell me what happend
OHHH, I am dumb. It was a local script. That has been my issue all this time
Oh ok, you had me worried for a second there.