Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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.

3 comments

0

You just change thekey code? and pls include your code.

0

Include ur code ;-;

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

1 answer

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

This discussion is preserved as it was. New answers, comments, and votes are closed.