How do I make a Toggle Sprint with animation

local IsRunning = false
UIS.InputBegan:connect(function(input)
if input.KeyCode == Enum.KeyCode.LeftControl then
IsRunning = not IsRunning
if IsRunning == true then
Character.Humanoid.WalkSpeed = 35
else
Character.Humanoid.WalkSpeed = 15
end
end
end)

14 Likes