Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I change shift to sprint to backslash instead of shift?

Asked by
Hizzaa -3
5 years ago

I dont want to mess with left shift because i would like to keep shift lock in my game, so my next best option is backslash but idk how to implement it into the script, everytime i try it breaks.

0
You just change thekey code? and pls include your code. User#5423 17 — 5y
0
Include ur code ;-; s_21 74 — 5y
0
I just used a generic script i didnt write one. i tried changing the key code to backslash and ive also tried 92 and neither work so idk Hizzaa -3 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago
Edited 5 years ago

I'm not the best at scripting but try this:

local service = game:GetService("UserInputService")
service.InputBegan:Connect(function(input,gameProcessedEvent)
    if gameProcessedEvent then return end
    if input.KeyCode == Enum.KeyCode.BackSlash then 
        game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 40
    service.InputEnded:Connect(function()
        game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 16
    end)

    end

end)

and if ya don't know where to put it, put it in the StarterGui

Ad

Answer this question