So, you want to make a Speed Run game on Roblox and need a speed script?
That’s where my guide comes in handy.
Utilizing my programming skills, I have made a speed script that works for almost every Roblox game.
What is Roblox walk speed script?
And in this post, I am about to show you the speed script that makes you faster the more you walk.
Also, check our separate post for making a kill brick using the Roblox kill script.
Roblox Speed Script – How to move faster in Roblox?
Speed scripts are the most common scripts used on Speedy games like Space Racing and Speed Run. You won’t get sample Roblox scripts anywhere else.
If you are a beginner then you should definitely go through our guide on how to add friends on Roblox and make a Roblox group.
Here is the code sample to freeze a player in Roblox:
local player = game.Players.LocalPlayer
local char = player.CharacterAdded:wait()
local h = char.Humanoid
h.WalkSpeed = 0
Also, you can increase the average speed of the character by increasing the value of the walkspeed.
You will face ROBLOX error codes like ROBLOX error code 610, ROBLOX error code 267, ROBLOX error code 279 etc.
Here is the speed script on Roblox to move faster:
local Players = game.Players
local RunService = game:GetService(“RunService”)
local SpeedPerStud = 0.1 –Configure this to your liking!!!!!
local StudsTraveled = 0
local LastPosition = nil
function playerAdded(player) –Fires when a player joins the server
local Speed = Instance.new(“NumberValue”) –In case the player dies, save their speed
Speed.Name = “SpeedValue”
Speed.Value = 16
Speed.Parent = player
local RootPartHeartbeat = nil
player.CharacterAdded:Connect(function(character)
LastPosition = character.HumanoidRootPart.Position
RootPartHeartbeat = RunService.Heartbeat:Connect(function()
if character:FindFirstChild(“HumanoidRootPart”) then –If the player jumps into the void or their character doesn’t exist for some reason, this will stop this block of code from running
local DistanceFromLastPosition = (character.HumanoidRootPart.Position-LastPosition).magnitude
Speed.Value = Speed.Value+(DistanceFromLastPosition*SpeedPerStud)
character.Humanoid.WalkSpeed = Speed.Value
LastPosition = character.HumanoidRootPart.Position
end
end)
end)
player.CharacterRemoving:Connect(function()
RootPartHeartbeat:Disconnect() –Prevents **serious** memory leaks AND errors!
end)
end
Players.PlayerAdded:Connect(playerAdded)
Create a script within ServerScriptService named SpeedScript in the Workspace of Roblox Studio.
Within the script, copy & paste this series of codes.
Check out our epic guide if you don’t know how to make clothes on Roblox.
Before copy-pasting the codes, Remember that the code sample contains information not for pasting in the script folder.
Check out the easiest way to reduce Roblox Lag & Speedup Gameplay.
Here is the Roblox walkspeed speed script code that can be changed with buttons:
local player = game.Players.LocalPlayer
repeat wait() until player.Character
local char = player.Character
local hum = char:WaitForChild(“Humanoid”)
local inputService = game:GetService(‘UserInputService’)
local keys = {
[‘Enum.KeyCode.LeftShift’] = true; [‘Enum.KeyCode.RightShift’] = true;}
inputService.InputBegan:connect(function(inputType)
if inputType.UserInputType == Enum.UserInputType.Keyboard then
— Make sure you’re checking for KeyBoard input only.
local makeKeyCodeAString = tostring(inputType.KeyCode)
if keys[makeKeyCodeAString] then
local speed = hum.WalkSpeed <= 16 and 30 or 16
— Ternary operator
— speed is equal to this
–[[
if hum.WalkSpeed <= 16 then
speed = 30
else
speed = 16
end
–]]
hum.WalkSpeed = speed
end
end
end)
Check out our separate post on how to delete roblox account.
Roblox FE Speed Script – 100% Working For R15 & R6 Characters
Most exploits have their built-in speed scripts. Some don’t work for Roblox.
So here’s a script that will work on almost all Roblox games:
local Players = game:service(‘Players’)
local Player = Players.LocalPlayer
local userInput = game:service(‘UserInputService’)
local runService = game:service(‘RunService’)
repeat wait() until Player.Character
local Character = Player.Character
local pHum = Character:WaitForChild(‘Humanoid’)
local humRoot = Character:WaitForChild(‘HumanoidRootPart’)
local Multiplier = 1.4
userInput.InputBegan:connect(function(Key)
if Key.KeyCode == Enum.KeyCode.LeftBracket then
Multiplier = Multiplier + 0.1
print(Multiplier)
wait(0.2)
while userInput:IsKeyDown(Enum.KeyCode.LeftBracket) do
wait()
Multiplier = Multiplier + 0.1
print(Multiplier)
end
end
if Key.KeyCode == Enum.KeyCode.RightBracket then
Multiplier = Multiplier – 0.1
print(Multiplier)
wait(0.2)
while userInput:IsKeyDown(Enum.KeyCode.RightBracket) do
wait()
Multiplier = Multiplier – 0.1
print(Multiplier)
end
end
end)
runService.Stepped:connect(function()
if userInput:IsKeyDown(Enum.KeyCode.LeftShift) then
humRoot.CFrame = humRoot.CFrame + pHum.MoveDirection * Multiplier
end
end)
Execute the code using Shift. I don’t recommend using these codes because FE speed scripts are full of bugs. Check out how you can perform a successful trade on Roblox.
FAQ
Question: What is the average Roblox walk speed?
Answer: 16 Studs per second is the average walk speed on Roblox.
Question: Can you use JavaScript in Roblox?
Answer: No. Roblox doesn’t allow the use of the JAVA script. Lua is the unique programming language for Roblox scripting.
Question: What is a humanoid in Roblox?
Answer: Humanoid is the Roblox Avatar. It is the model that gives functionality to the character.
Final Thoughts
Speed scripting is very hard because you have to learn the basic use of the Lua programming language.
You can paste the code I provided you and build your own game using the same language. Just change the speed value instead.