local npc = script.Parent
local human = script.Parent.Humanoid
local hrp = npc.HumanoidRootPart
local runservice = game:GetService("RunService")
local Players = game:GetService("Players")
debounce = false
local damageAmount = 10
for _, child in pairs(npc:GetChildren()) do
print(child)
if child:IsA("BasePart") then
child.Touched:Connect(function(hit)
if debounce then return end
local humanoid = hit.Parent:FindFirstChild("Humanoid")
if humanoid then
humanoid:TakeDamage(damageAmount)
local Animation = script.Animation
local Anim = human:LoadAnimation(Animation)
Anim:Play()
debounce = true
wait(4)
debounce = false
else
end
end)
end
end