Essentially, when you press left shift, it plays an animation. However, the humanoid plays the running animation even if they aren't moving.
local UIS = game:GetService("UserInputService")
local player = game.Players.LocalPlayer
local character = player.Character
if not character or not character.Parent then
character = player.CharacterAdded:wait()
end
local humanoid = character:WaitForChild("Humanoid")
UIS.InputBegan:connect(function(input)
if input.KeyCode == Enum.KeyCode.LeftShift then
humanoid.WalkSpeed = 25
local Anim = Instance.new("Animation")
Anim.AnimationId = "rbxassetid://4786194263"
PlayAnim = humanoid:LoadAnimation(Anim)
PlayAnim:Play()
end
end)
UIS.InputEnded:connect(function(input)
if input.KeyCode == Enum.KeyCode.LeftShift then
humanoid.WalkSpeed = 16
PlayAnim:Stop()
end
end)

5 comments
Perhaps the animation priority isnt Movement or something. Im kinda new to animations too
https://developer.roblox.com/en-us/api-reference/property/AnimationTrack/Priority Make the animation priority movement/2?
https://developer.roblox.com/en-us/api-reference/enum/AnimationPriority/index.html
humanoid.Running:Connect(function() ? ?
I'm currently writing an answer, found the solution.