local character = script.Parent
boostanim = character.Humanoid:LoadAnimation(character.BoostAnimation)
local humanoid = character:WaitForChild("Humanoid")
speed = character.Humanoid.WalkSpeed
game:GetService("UserInputService").InputBegan:connect(function(input) if input.KeyCode == Enum.KeyCode.LeftShift then if speed > 0 then boostanim:Play() humanoid.FallingDown:Connect(function(isActive) -- I tried to make it work with falling input.KeyCode = input.KeyCode.BackSpace end)
end
end
end)
game:GetService("UserInputService").InputEnded:connect(function(input) if input.KeyCode == Enum.KeyCode.LeftShift then boostanim:Stop() end
I haven't really tested it but if I'm correct then this should be what you're looking for
local character = script.Parent local humanoid = character:WaitForChild("Humanoid") local boostanim = humanoid:LoadAnimation(character.BoostAnimation) game:GetService("UserInputService").InputBegan:Connect(function(input) if input.KeyCode == Enum.KeyCode.LeftShift then local fall = character.HumanoidRootPart.Velocity.Y local speed = character.Humanoid.WalkSpeed if speed > 16 and fall == 0 then boostanim:Play() end end end) game:GetService("UserInputService").InputEnded:Connect(function(input) if input.KeyCode == Enum.KeyCode.LeftShift then boostanim:Stop() end end)