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

How do I prevent animations from interrupting eachother?

Asked by 9 years ago

So, I'm making a tool that plays animations(from the Humanoid), and I don't want the animations to interrupt eachother. How would I prevent this?

0
make a debounce and wait until the animation is over or wait the length of the animation to play the next animation dirty_catheter 7 — 9y
0
But I want it so if they click while an animation is playing, they have to wait until it stops before they can click to play the next one. antonio6643 426 — 9y

1 answer

Log in to vote
0
Answered by 9 years ago

It depends on what you are doing:

If you are making a tool that plays animations seperately, make a value for it's length, then wait until the animation has finished.

Or, if you are playing multiple animations at once, go back to the animation editor, and set their animation type to something else. Every animation type has to bee different.

E.G 1:

local anim = script.anim
local length = 1 -- the length of anim, don't believe it can be done with a script
local load = game.Workspace.Player.Humanoid:LoadAnimation(anim)
load:Play()
wait(length)

E.G 2:

  • AnimationType for anim1 = "core"
  • AnimationType for anim2 = "action" etc.

Sorry if for some reason it didn't help :P

Ad

Answer this question