Help with animation [Help required]

this is part of my run script and it does everything but won’t load in the animation and shows no error

local UIS = game:GetService('UserInputService')
local Player = game.Players.LocalPlayer
local Character = Player.Character


UIS.InputBegan:connect(function(input)
    if input.KeyCode == Enum.KeyCode.LeftShift then
        Character.Humanoid.WalkSpeed = 26
        local Anim = Instance.new('Animation')
        Anim.AnimationId = 'rbxassetid://11656317884'
        PlayAnim = Character.Humanoid:LoadAnimation(Anim)
        PlayAnim:Play()
    end
end)


UIS.InputEnded:connect(function(input)
    if input.KeyCode == Enum.KeyCode.LeftShift then
        Character.Humanoid.WalkSpeed = 16
        PlayAnim:Stop()
    end
end)

Any help would be appreciated :slight_smile:

The animation you’re trying to use is not yours.

yea but it’s the game owner’s… like team creation thing…
so ig it should work

are you doing the script in the game owned by the animation owner?

Character.Humanoid:WaitForChild("Animator"):LoadAnimation(Anim)

yea

no :LoadAnimation() if for humanoid…

Try loading it onto the animator. It works on both.

1 Like

that method is deprecated, new method is for the animator but idk

anyways ill try once im back on my PC

try printing after you play the animation to see if it even played to begin with

umm it does print