I'm trying to get an animation to play. The issue is that if you play the animation and then start another one (e.g. walk or jump,) the original animation is cancelled. Currently, I use this code to stop any existing animations:
local a = chr:GetPlayingAnimationTracks() for _,v in pairs(a) do v:Stop() end
After this, the animation gets played. The problem is that this only accounts for animations that begin before my animation begins, not afterwards. Is there a way to prevent any new animations from playing?
Sometimes custom animations get overridden by other animations. This all depends on the priority of the animation. If you want the animation to play on top of everything without getting overridden, you'll have to change your animation's priority. This is how prioritizing animations works:
If an animation with a higher priority is played after an animation with lower priority, the lower priority animation ends and the higher priority animation plays on top of it.
What if two or more animations on the same priority are played after each other? Any current animation[1] can be overridden by the same priority animation[2], if Animation [2] plays after Animation [1]. Whatever order it is, it still does that.
Core
is the lowest priority ever.
Idle
is for idle animations, and should be used for just that purpose.
Movement
is for movement animations, and again for that purpose.
Action
is the highest priority of animations, and should be used for, any specific action, like reloading a gun, picking up an item, punching, etc.
So hopefully you can apply your knowledge with a solution to this problem now.
EDIT: please forgive me if i have disobeyed the mods