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

How do I Make my Animation Move an NPC Forward?

Asked by
Sulu710 142
4 years ago

I am very new to animation, so I apologize if this is a dumb question with a simple answer. I created a very simple walk animation that lasts 1 second, and moves the humanoid forward 2 studs. Then, in a server script, I created a loop to run the animation 20 times to move the NPC forward. However, once it completes the animation, it moves back to it's original position and does the animation again, instead of progressively walking forward. Here is my script if it will help:

Dummy = game.Workspace.Dummy
Animation = game.Workspace.Animation
LoadedAnimation = Dummy.Humanoid:LoadAnimation(Animation)

for i = 1,20,1 do
    loadedAnimation:Play()
    wait(1)
end

As I said before, I am very new to animation, so I apologize if this is a dumb question. Thank you for reading!

1 answer

Log in to vote
2
Answered by
royaltoe 5144 Moderation Voter Community Moderator
4 years ago

Sulu, check this out: https://devforum.roblox.com/t/how-to-keep-the-animations-from-returning-to-the-start-point/282119

0
Thank you so so much! :D Sulu710 142 — 4y
Ad

Answer this question