Answers for "Roblox shift to sprint/run Script"

0

Roblox shift to sprint/run Script

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)
Posted by: Guest on April-03-2022

Browse Popular Code Answers by Language