I tried to make an assassin NPC, That follow's ( worked ), And also do damage on the player with debounce cooldown ( worked ), So here's the Attack Script
local rarm = script.Parent.LeftLowerArm
local larm = script.Parent.RightLowerArm
local Hum = script.Parent.HumanoidRootPart
local debounce = false
function attack(dmg)
if not debounce then
debounce = true
if dmg.Parent:FindFirstChild("Humanoid") then
script.Parent.Humanoid:LoadAnimation(script.Parent.Animations.SpiningBladeAnimation)
dmg.Parent.Humanoid.Health = dmg.Parent.Humanoid.Health -10
wait(4)
debounce = false
end
end
end
rarm.Touched:Connect(attack)
larm.Touched:Connect(attack)
Hum.Touched:Connect(attack)
So when the NPC Touches me ( Because of the Following Script ) And i take damage, It Doesn't Load the animation I checked the OutPut and there's nothing. Can you help me out?
