local function LightAttack(actionName, inputState) if crouch == true then while wait(.5) do if script.Parent.HumanoidRootPart.Orientation.Y == 0 then if leftValue == 1 then if inputState == Enum.UserInputState.Begin then animtrack236:Play() end end end end elseif inputState == Enum.UserInputState.Begin then if script.Parent.HumanoidRootPart.Orientation.Y == 0 then if leftValue == 1 then animTrack5A:Play() else animTrack5A:Play() end
So I'm trying to get a specific animation (animtrack236) to play when down, left, and an attack button is pressed. Right now that animation does play, but several other animations seem to impede it, such as another normal attack animation (animtrack5A) that occasionally plays at or before 236 does, and a crouching animation that plays when I press down, thus making the animation either come after 5A, or not appear at all. Furthermore, after I input the button sequence, if I keep holding down left, 236 will keep on playing until I let go, despite it not being a looping animation. I've tried adjusting the weights, adding in more code to not do the special when I'm not pressing the attack button, and others, but nothing I've tried so far seems to work. Both 236 and 5A are Action, while the crouching animation is Idle. Does anyone know what I can do to prevent 5A and the crouching animation from playing when only 236 should be playing?
Meltdown81 already posted this as a comment, but I'll also repost it here because it's technically an answer.
"Change the priority in the crouching animation to either Core or Idle and set the combo animation's priority as Action. You may also want to stop all playing tracks or put a wait time equal to the tracks length after it's play code."
Basically what you have to do is go into the animation editor, and click Edit > Set Priority and then to the desired priority.