how to make part that animate npc? not player
✓ ANSWER ACCEPTED
how to make part that animate npc?
1 answer
✓ Accepted answer
local target = script.Parent -- Change this to point to the part you want to trigger the event
target.Touched:Connect(function() -- When the player touches the part
local dummy = workspace.Dummy -- Refer to the NPC, Change this to point to the NPC
local animator = dummy.Humanoid.Animator -- Refer to the animator
local animation = animator:LoadAnimation() -- Loads the animation, Insert a Animation ID into LoadAnimation()
animation:Play() -- Play the animation
end)
Insert it into a Script on a Part.
This discussion is preserved as it was. New answers, comments, and votes are closed.
