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

How can I play an animation?

Asked by 3 years ago
Edited 3 years ago

I have created a lightning-zap effect in my Roblox game. I have an animation of the player moving there hand out for the lightning to shoot out of. However, whenever the animation is supposed to play, my character walks in place. Here is the code for that part.

local Animation = Instance.new("Animation")
        Animation.AnimationId = "rbxassetid://5525117451"
        local LoadAnimation = Character.Humanoid:LoadAnimation(Animation)
        LoadAnimation:Play()
0
you need to make it copy-able User#30567 0 — 3y

2 answers

Log in to vote
0
Answered by 3 years ago

Everything Looks Right With The Code you Just need To Turn Off Copy Lock you animation

Ad
Log in to vote
0
Answered by 3 years ago
Edited 3 years ago

I figured it out, I only animated the hand, so the hand animation worked, but the rest of the body kept doing the other animations (which was walking). All I had to do was edit the animation, so that the entire body stayed still, other than the hand.

Answer this question