NPC Damaging itself with Tool issue

I have a GIF here showcasing the NPC spawning then instantly damaging itself with the sword (Supposed to damage other players only), how do I fix this issue?
image
https://i.gyazo.com/0f4478ae8a82ff638d2aa34eaea69e75.gif

use this : Humanoid:IsDescendantOf

Well, this is the script that controls damage.
image

Add a tag to the humanoid. Check if the tag is there and if it is, don’t damage the humanoid.

if hum ~= nil and not hum:IsDescendantOf(script.Parent) then

Just add a if statement that checks if hit.Parent ~= TheNPC model.