Question : shift to sprint roblox
Answered by : metalhead
-- Economic was incorrect :)
-- This is an actual working version I made myself editing Economic's.
-- I already know how to do this, anyway.
local UIS = game:GetService("UserInputService")
local Player = game.Players.LocalPlayer
local Character = script.Parent
local Humanoid = Character:WaitForChild("Humanoid")
UIS.InputBegan:Connect(function(Key) if Key.KeyCode == Enum.KeyCode.LeftShift or Key.KeyCode == Enum.KeyCode.RightShift then Humanoid.WalkSpeed = 16 end
end)
UIS.InputEnded:Connect(function(Key) if Key.KeyCode == Enum.KeyCode.LeftShift or Key.KeyCode == Enum.KeyCode.RightShift then Humanoid.WalkSpeed = 6 end
end)
Source : | Last Update : Tue, 28 Dec 21
Question : Roblox shift to sprint/run Script
Answered by : yourmomwithmeinbed
local uis = game:GetService(“UserInputService”)
local player = game.Players.LocalPlayer
local char = workspace:WaitForChild(player.Name)
local walk = 16
local run = 30
uis.InputBegan:Connect(function(input) if input.KeyCode == Enum.KeyCode.LeftShift then char.Humanoid.WalkSpeed = run end
end)
uis.InputEnded:Connect(function(input) if input.KeyCode == Enum.KeyCode.LeftShift then char.Humanoid.WalkSpeed = walk end
end)
Source : https://devforum.roblox.com/t/sprint-script-not-working-because-of-shiftlock/1287951/3 | Last Update : Sun, 10 Apr 22