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

Is there a way I can make an NPC do an animation via a ROBLOX emote?

So in the Catalog of emotes, I stumbled across this emote. I created an NPC and used this following code:

local animation = "https://roblox.com/catalog/3823158750/Godlike"
local humanoid = script.Parent:WaitForChild('Humanoid')
local dance = humanoid:LoadAnimation(animation)
dance:Play()

But it doesn't work. I'd assume it's Line 1 causing the issue, but I'm not the professional here. All help is appreciated.

1 comment

0

is the Model r15?

1 answer

Here is the Fixed script:

local animation = Instance.new("Animation", workspace.NPC)
animation.AnimationId = "rbxassetid://3337994105"
local human = workspace.NPC.Humanoid
local dance = human:LoadAnimation(animation)
dance:Play()

Make sure the NPC is unanchored, but also you CAN anchor the HumanoidRootPart. Also, you were using the emote, not the animation. I have the animation here. You need an instance of an animation, not just the ID. Happy to help, b_mni.

3 comments

0

make sure the NPC is r15

0

What do you mean, "Emote, not the animation"

0

The emote is the emote that you see when going to buy it, the animation is INSIDE the emote.

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