Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

| Solved! | How Do I Get An NPC to Play an Emote?

I know how to get an NPC to do an animation, but I want it to do a pre-made emote.

I have the NPC unanchored and I have had it play custom animations, but for some reason I get no errors, yet the NPC doesn't move when I use the Salute emote (rbxassetid://3360689775)

Here's the script I use usually:

local animation = script:WaitForChild('Animation')
local humanoid = script.Parent:WaitForChild('Humanoid')
local dance = humanoid:LoadAnimation(animation)
dance:Play()
print("animationplayed")

I have an animation placed inside the script

Any Ideas on how to resolve this issue will be very much appreciated

Thanks, IncredibleTeamAidan

Extra Note: the print does work, and I have this running on an R15 model so I know that the rig type doesn't cause problems

2 comments

1

Does it not say anything else in output?

0

Theres nothing apart from the print in the output :/

2 answers

✓ Accepted answer

Theres only 2 reasons I can guess as to why this isn't working:

  1. The animation doesn't have the "Action" Animation Priority

  2. You don't have ownership of the animation, and therefore cannot play it

2 comments

0

It's an official Roblox Emote, and usually anything by the official Roblox account can be used

0

I see, honestly I don't know whats causing your problem then.

You need to ensure that you have the correct format in the AnimationId, that's where the problem is caused!

This discussion is preserved as it was. New answers, comments, and votes are closed.