RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"make a control to sprint code tell me where to put it"
-- local script, put this in StarterPlayerScripts local UserInputService = game:GetService("UserInputService") local player = game.Players.LocalPlayer local sprinting = false local function toggleSprint(input) if input.KeyCode == Enum.KeyCode.LeftShift then if sprinting then sprinting = false player.Character.Humanoid.WalkSpeed = 16 else sprinting = true player.Character.Humanoid.WalkSpeed = 50 end end end UserInputService.InputBegan:Connect(toggleSprint)