I have the part here: https://gyazo.com/afd73a7fec4f7d097e99a3dcb95d2076 And it does work, but the problem is only once, when the ai walked into the other one it damaged him but only that time then it just did nothing. Example: https://gyazo.com/6789f6f4c1fc9d7a6552cd3add2f3338 (It did damage it, it just healed before I could get it in the gif) How do I fix it??
script.Parent.Touched:connect(function(part)
local humanoid1 = part.Parent:FindFirstChild("Humanoid")
local humanoid2 = part.Parent.Parent:FindFirstChild("Humanoid")
if humanoid1 then
humanoid1:TakeDamage(script.Parent.Damage.Value)
end
if humanoid2 then
humanoid2:TakeDamage(script.Parent.Damage.Value)
end
end)

4 comments
It should work :/
^
It works.......... Only on first touch. :/
I tested the script, and everything went well.