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.
-- 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
- In Roblox Studio Explorer, open StarterPlayer > StarterCharacterScripts.
- Click the + icon and insert a LocalScript named SprintScript.
- 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.
Double Jump Script
Lets players jump a second time mid-air using Roblox's JumpRequest event (works on PC, mobile, and controller).
Kill Brick Script
Instead of copying 100 scripts into 100 lava bricks, tag any part 'KillBrick' and let one clean server script handle all of them.
Round System Script
A clean server loop that runs Intermission -> Active Round -> Winner announcement and updates a shared Status StringValue for your HUD.
Pet Follow Script
Makes equipped pets glide smoothly behind the player's shoulder with a lively sine-wave hover and zero physics jitter.
Skip manual wiring.
Let Revix code & playtest it.
Start building freeFree to start. No card needed.

