local Players = game:GetService("Players") local player = Players.LocalPlayer local char = player.Character or player.CharacterAdded:Wait() local hum = char:WaitForChild("Humanoid") local idleAnim = Instance.new("Animation") idleAnim.AnimationId = "rbxassetid://136687532783709" local walkAnim = Instance.new("Animation") walkAnim.AnimationId = "rbxassetid://99498309796580" local jumpAnim = Instance.new("Animation") jumpAnim.AnimationId = "rbxassetid://139390570947836" local idleTrack = hum:LoadAnimation(idleAnim) local walkTrack = hum:LoadAnimation(walkAnim) local jumpTrack = hum:LoadAnimation(jumpAnim) local function play(anim) idleTrack:Stop() walkTrack:Stop() jumpTrack:Stop() anim:Play() end play(idleTrack) hum.Running:Connect(function(speed) if hum:GetState() == Enum.HumanoidStateType.Jumping or hum:GetState() == Enum.HumanoidStateType.Freefall then return end if speed > 0 then play(walkTrack) else play(idleTrack) end end) hum.Jumping:Connect(function() play(jumpTrack) end) hum.StateChanged:Connect(function(_, newState) if newState == Enum.HumanoidStateType.Landed then if hum.MoveDirection.Magnitude > 0 then play(walkTrack) else play(idleTrack) end end end)