How do I animate an R6 NPC?

Hello!

I’m trying to animate an R6 NPC, however no animations seem to be working.

I am attempting to use the default idle animation that comes with the R6 rig when players spawn, and I’m using the health and the animate script that are inside of the player’s model.

I’ve tried to unanchor the NPC as that’s sometimes the case with R15 NPCs, however it isn’t the case in here unfortunately.

Do I have to create my own script to load it? If so I am fine with doing so.

TIA for the help!

2 Likes

I believe the default animation script is a LocalScript and thus wouldn’t run if it was put into a model in workspace. Putting the code into a normal script might work, but I’m not sure how the default animation script is made so I cannot be sure. Generally, I create custom scripts to animate NPCs using Humanoid:LoadAnimation()

5 Likes

Thanks!

It appears that the script is for R15 for some reason? I’ll try finding the animation ID online. So it’s just this:

Humanoid:LoadAnimation(AnimationID)

or is there more behind it?

Instead of loading an animation’s ID, you’d load an Animation Instance and then :Play() it. You can get the R6 default animation script by setting your game to R6, playing it, and then copying the animation script from your character.