You can write your topic however you want, but you need to answer these questions:
I Want to play a running animation When I start to sprint
When I start to run the animation works but when I start jumping it wont stop the animation, Also when I move to much while the animation is playing it wont stop and it gets stuck again.
here is the script (btw this is on a StarterCharacterScript)
From what I’m seeing is you need to incorporate a stop for when the player jumps (presses space) to stop the animation and have a check for seeing if the player is still sprinting (holding down shift) after pressing space to jump.
local Key2 = Enum.Keycode.Space
local function SpacePressed()
return UserInputService:IsKeyDown(Key2)
end
local function InputMid(input, gameProcessedEvent)
if SpacePressed then
Tween2:Play()
PlayAnim:Stop()
script.Parent.Humanoid.Walkspeed = 16
end
end
Not 100% sure any of this code will work (off the top of my head) but I think you could work with this as an example to fix the issue you’re having!