Basically making a tool that can ONLY damage "Enemy", works perfectly until the "Enemy"'s health goes to zero, and all the other Humanoid's health that are NOT "Enemy" is also set to zero, and the outpost doesn't say anything, maybe I'm doing something wrong?, not too sure.
local weapon = script.Parent
local damage = 25
weapon.Touched:Connect(function(TouchedPart)
if TouchedPart ~= script.Parent.Parent.Parent then
if TouchedPart.Parent:FindFirstChild("Enemy") then
local Enemy = TouchedPart.Parent:FindFirstChild("Enemy")
Enemy:takeDamage(25)
end
end
end)
Any help would be appreciated, thanks!

3 comments
Doesn't seem to work..
is there any errors and is it in a serverscript?
If there is no errors it might be because it cant find anything names Enemy? is there a part inside the model called enemy?