Start building

Roblox Sprint Script (Shift-to-Sprint + FOV Tween)

Hold Left Shift to sprint smoothly with a subtle camera FieldOfView boost and clean speed reset on release.

Type: LocalScriptExplorer: StarterPlayer > StarterCharacterScriptsLevel: Beginner
LocalScriptStarterPlayer > StarterCharacterScripts
-- LocalScript in StarterCharacterScripts
local UserInputService = game:GetService("UserInputService")
local TweenService = game:GetService("TweenService")

local character = script.Parent
local humanoid = character:WaitForChild("Humanoid") :: Humanoid
local camera = workspace.CurrentCamera

local WALK_SPEED = 16
local SPRINT_SPEED = 26
local WALK_FOV = 70
local SPRINT_FOV = 82
local tweenInfo = TweenInfo.new(0.22, Enum.EasingStyle.Quad, Enum.EasingDirection.Out)

local function setSprinting(active: boolean)
	humanoid.WalkSpeed = if active then SPRINT_SPEED else WALK_SPEED
	TweenService:Create(camera, tweenInfo, {
		FieldOfView = if active then SPRINT_FOV else WALK_FOV,
	}):Play()
end

UserInputService.InputBegan:Connect(function(input, gameProcessed)
	if not gameProcessed and input.KeyCode == Enum.KeyCode.LeftShift then
		setSprinting(true)
	end
end)

UserInputService.InputEnded:Connect(function(input)
	if input.KeyCode == Enum.KeyCode.LeftShift then
		setSprinting(false)
	end
end)

How to install in Studio

  1. In Roblox Studio Explorer, open StarterPlayer > StarterCharacterScripts.
  2. Click the + icon and insert a LocalScript named SprintScript.
  3. Paste the Luau code above and press Play to test holding Left Shift.

Tips & customization

  • Adjust SPRINT_SPEED (24–30 feels snappy for obbies and open maps).
  • Add a mobile Sprint button by calling setSprinting(true/false) from a TouchButton.

Common questions.

Why should a Roblox sprint script go in StarterCharacterScripts?

Placing it in StarterCharacterScripts guarantees a fresh reference to the player's Humanoid every time they respawn.

Does this sprint script work for both R6 and R15 avatars?

Yes — it uses Humanoid.WalkSpeed and workspace.CurrentCamera, which work identically on R6 and R15.

More free Luau scripts.

All 16 scripts

Skip manual wiring.
Let Revix code & playtest it.

Start building free

Free to start. No card needed.