Issue with Animations

Ok so i have this issue where the legs move when dashing although animation is set to action
Code:

local UIS = game:GetService("UserInputService")
local char = script.Parent
local slideAnim = Instance.new("Animation")
slideAnim.AnimationId = "rbxassetid://10481905967" 
local keybind = Enum.KeyCode.E -- between the key for ability
local canslide = true
UIS.InputBegan:Connect(function(input,gameprocessed)
    if gameprocessed then return end
   if not canslide then return end 
    if input.KeyCode == keybind then
        canslide = false
        
        
        local playAnim = char.Humanoid:LoadAnimation(slideAnim)
        playAnim:Play()
        
        local slide = Instance.new("BodyVelocity")
        slide.MaxForce = Vector3.new(1,0,1) * 30000
        slide.Velocity = char.HumanoidRootPart.CFrame.lookVector * 100
        slide.Parent = char.HumanoidRootPart
        
        for count = 1, 8 do
            wait(0.1)
            slide.Velocity*= 0.7
        end
        playAnim:Stop()
        slide:Destroy()
        canslide = true
    end
end)

To what priority have you set the animation?

Action it is set to any problems
//////////////////////

I mean if its supposed to be a moving animation, then set it to —> Movement ?

lemme try thanks for the reply


Does not work

I found this post with a problem similar to yours. Looks like the solution might work for you as well.

I believe it’s because you didn’t animate the legs,If they don’t appear on the timeline as a keyframe then that means they’re empty,and will play the animation of what comes previously in the priority (Movement) since your animation is Action,it will still override the other animated parts but not the legs since they were never animated to be overridden.Just add the legs into position and you should be fine.