I think I’ve found a bug and since I can’t post in #Bugs I decided to share it here.
If you load two animations with the same priority the animation that is played last will always override the animation played first. However, the animation played first will never override the animation played last, making me believe it is not intended behavior.
This happens in both studio and in published games.
Here is some example code:
local player = game:GetService("Players").LocalPlayer local character = player.Character or player.CharacterAdded:Wait() local humanoid = character:WaitForChild("Humanoid") local animator = humanoid:WaitForChild("Animator") local aim = animator:LoadAnimation(script:WaitForChild("aim")) local hold = animator:LoadAnimation(script:WaitForChild("idle")) aim:Play() task.wait(5) hold:Play() task.wait(5) aim:Play() -- Aim does not play, instead hold continues playing
Both of the animations have the same priority, yet hold is not overriden by aim.