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

I really need help with this animations issue I am currently having?

Asked by 8 years ago

I have placed an animate script with a custom animation that I made into some NPCs and it works perfect in studio mode but online it doesn't work at all? The NPCs stand still for some reason.

1 answer

Log in to vote
0
Answered by 8 years ago

I've been working on this problem for days, and I found a solution that worked for me! I assume it'll work for you too! It turns out that the animation has to played for each client that joins the game. This can be accomplished by using a loop or the PlayerAdded event. In the example code below, I use a loop.

AimAnimation = AnimationStorage:WaitForChild("Aim") --Wherever your animation is
local AimTrack = Humanoid:LoadAnimation(AimAnimation)

while true do
    AimTrack:Play() 
    wait(1)
end

As you can see, it takes very little code to run the animation! Hopefully this works for you.

Ad

Answer this question