the npc was supposed to damage the player and play an animation, but is not playing the animation

Hum = script.Parent.Parent.Humanoid function onTouch(part) local humanoid = part.Parent:FindFirstChild("Humanoid") if (humanoid ~= nil) then -- if a humanoid exists, then humanoid.Health = humanoid.Health - 1 -- damage the humanoid script.Parent.Parent.Humanoid:LoadAnimation(Hum.Anim) end end

script.Parent.Touched:connect(onTouch)

3 comments

1

Please use the code block. For starters you loaded the animation but never played it.

0

PLEASE USE CODE BLOCK I CAN"T SEE

0

USE CODE BLOCK!!!!