I tried making a script where i can toggle on my sprint on and off but it didn't work, is there something that i'm missing?
local player = game.Players.LocalPlayer
local humanoid = player.Character.Humanoid
local UIS = game:GetService("UserInputService")
UIS.InputBegan:Connect(function(input)
if input.KeyCode == Enum.KeyCode.LeftControl then
humanoid.WalkSpeed = 35
end
end)
UIS.InputEnded:Connect(function(input)
if input.KeyCode == Enum.KeyCode.LeftControl then
humanoid.WalkSpeed = 16
end
end)

1 comment
Thanks!