local Players = game:GetService("Players") local player = Players.LocalPlayer -- Wait for the character to load player.CharacterAdded:Connect(function(character) local humanoid = character:WaitForChild("Humanoid") humanoid.WalkSpeed = 32 -- Default is 16, double it for faster running end) -- Also update speed if character already loaded (e.g., during testing) if player.Character then local humanoid = player.Character:FindFirstChild("Humanoid") if humanoid then humanoid.WalkSpeed = 32 end With a button: local UserInputService = game:GetService("UserInputService") local Players = game:GetService("Players") local player = Players.LocalPlayer local character = player.Character or player.CharacterAdded:Wait() local humanoid = character:WaitForChild("Humanoid") local normalSpeed = 16 local sprintSpeed = 32 -- Function to set speed local function setSpeed(speed) if humanoid then humanoid.WalkSpeed = speed end end -- Handle key input UserInputService.InputBegan:Connect(function(input, isProcessed) if not isProcessed and input.KeyCode == Enum.KeyCode.LeftShift then setSpeed(sprintSpeed) end end) UserInputService.InputEnded:Connect(function(input) if input.KeyCode == Enum.KeyCode.LeftShift then setSpeed(normalSpeed) end end) Notes WalkSpeed = 16 is the default speed. Anything above 16 is faster; common sprint speeds are around 24–32. Use a LocalScript, because UserInputService and direct player control only work client-side. Make sure this runs client-side only, or it won’t work.
local Players = game:GetService("Players") local player = Players.LocalPlayer -- Wait for the character to load player.CharacterAdded:Connect(function(character) local humanoid = character:WaitForChild("Humanoid") humanoid.WalkSpeed = 32 -- Default is 16, double it for faster running end) -- Also update speed if character already loaded (e.g., during testing) if player.Character then local humanoid = player.Character:FindFirstChild("Humanoid") if humanoid then humanoid.WalkSpeed = 32 end With a button: local UserInputService = game:GetService("UserInputService") local Players = game:GetService("Players") local player = Players.LocalPlayer local character = player.Character or player.CharacterAdded:Wait() local humanoid = character:WaitForChild("Humanoid") local normalSpeed = 16 local sprintSpeed = 32 -- Function to set speed local function setSpeed(speed) if humanoid then humanoid.WalkSpeed = speed end end -- Handle key input UserInputService.InputBegan:Connect(function(input, isProcessed) if not isProcessed and input.KeyCode == Enum.KeyCode.LeftShift then setSpeed(sprintSpeed) end end) UserInputService.InputEnded:Connect(function(input) if input.KeyCode == Enum.KeyCode.LeftShift then setSpeed(normalSpeed) end end) Notes WalkSpeed = 16 is the default speed. Anything above 16 is faster; common sprint speeds are around 24–32. Use a LocalScript, because UserInputService and direct player control only work client-side. Make sure this runs client-side only, or it won’t work.