Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How do I create NPC animations?

Asked by 9 years ago

I'm trying to create a video with an animation I created with ROBLOX's animation editor. I tried checking all over the wiki, freemodels, etc. But still no luck...

2 answers

Log in to vote
3
Answered by
Perci1 4988 Trusted Moderation Voter Community Moderator
9 years ago

The only difference between NPCs and players is that instead of loading the animation into the Humanoid, you load it into an AnimationController. You can insert it with the basic objects window, or via a script.

local id = 00000 --Change to your anim id
local animation = Instance.new("Animation")
animation.AnimationId = id
local controller = Instance.new("AnimationController")
local animTrack = animController:LoadAnimation(animation)
animTrack:Play()

That's pretty much it. Of course, I did not add parents and other details. I just gave you the basic logic and methods.

Here's the wiki article.

Ad
Log in to vote
0
Answered by 9 years ago

This isn't working for me can you please help me.

Answer this question