How would I implement animations to an npc that moves to certain points?

I have two npcs that move to certain points but it looks weird because they look like descendants from ghosts, so I want to give them animations but I don’t know how.

Explorer:
Capture

The localscript “Animate” is roblox’s animation script for players. Yes, it is in r6.

Script code (for the normal script):

local dummy = script.Parent
local middle = game.Workspace.Spawn1Middle
local End = game.Workspace.Spawn1End

dummy.Humanoid:MoveTo(middle.Position)
-- wait one second
dummy.Humanoid:MoveTo(End.Position)

Someone please help!

3 Likes

inside of the ‘animate script’ there should be values for each animation that the character uses normally (i mean like they’re children of the script), and those values can be changed to whatever animation you’d like to use

So for example I could create variables like this?

local anim = dummy.Animation
local idle = “(id)”
local moving = “(id)”

anim.Animation = moving
dummy.Humanoid:MoveTo(middle.Position)
anim.Animation = idle
-- wait one second
anim.Animation = moving
dummy.Humanoid:MoveTo(End.Position)

Sorry if this is wrong, I’m on mobile right now and please tell me if I made errors or I did this wrong.

1 Like

Yes, it already has values.

It always has values

Not sure if this is your same situation, but maybe it will help.

1 Like

i worded it wrong; apologies for the misconception

all the values have an animation object inside of them, create your own animation for each one you want to change and place the id of the animation you made in the animation object

image

So yea, I would make an animation in the npc

So, i figure out how to do it, for people that want to know, basically i made two animations, one was idle and one was walking. then i made variables for them with load animation. when the npc starts walking it will play the walking anim, when it stops, it plays the idle. wait one second, stops the idle anim and plays the walking anim. then when it reaches the end it stops and destroys itself.