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

How to make my NPC plays an animation ?

Asked by 7 years ago

I've read that you should use "Animation Controller" but it doesn't work for me..

http://imgur.com/a/sH1cZ

I tried to make the zombie plays idle animation using this script

local animController = Instance.new("AnimationController")
local animTrack = animController:LoadAnimation(animation)
animTrack:Play()

but it doesn't work.

I've Rig the character Perfectly. I've animate it using the Roblox Animation Plugin too.

I just need to have a working script so that my animation (id) can be loaded to that zombie.

0
You either use the humanoid or a Animation Controller not both or you will not be able to play the animation. User#5423 17 — 7y

3 answers

Log in to vote
0
Answered by 7 years ago

You don't need an animation controller. Make sure your zombie has a Humanoid then do the :LoadAnimation function into the Humanoid and maybe do Instance.new("Animation") to the humanoid. Then just do Animation:Play()

Ad
Log in to vote
0
Answered by 6 years ago

local char = script.Parent local humanoid = char.Humanoid local head = char.Head

local w = humanoid:LoadAnimation(head.Dance3) w:Play()

This interacts with the head and plays the animation.

Log in to vote
-1
Answered by 7 years ago

Maybe use R15 to animate it.

0
R15 means Rig 15, meaning it's a character with 15 body parts; your saying use a rig to animate a rig..? And that wasn't his question; he was asking how to have a NPC play an animation. TheeDeathCaster 2368 — 7y

Answer this question