I can not use written any type of code on this yet as I just don’t recognize the methodology behind this and the dev forum heeded no results.

You are watching: How to walk backwards on roblox

Would over there be any great way the only enabling a player come walk backwards?

I’d choose to start advance of a single-player narrative video game just based upon this one gameplay element.


One way I have the right to think of act it would certainly be to have the WalkSpeed collection to 0, yet when you are pressing down ‘S’ (or the other machine equivalents) that sets your WalkSpeed come 16 or every little thing you want it to be.


1). In the Characters’ humanoid there is an “AutoRotate” property, just collection it come falsehttps://developer.centregalilee.com.com/en-us/api-reference/property/Humanoid/AutoRotate

2). Disable the an essential that move the player forwardhttps://developer.centregalilee.com.com/en-us/api-reference/function/ContextActionService/BindAction


I spent about two minutes conveniently testing mine idea, here it is if you want it (just placed it in a localscript in StarterCharacter or StarterGui)

local Player = game.Players.LocalPlayerlocal InputKey = "S"repeat wait() until Player.Characterlocal Humanoid = Player.Character:WaitForChild("Humanoid")Humanoid.WalkSpeed = 0local UserInputService = game:GetService("UserInputService")UserInputService.InputBegan:connect(function(UserInput, GameProcessedEvent)if UserInput.UserInputType == Enum.UserInputType.Keyboard climate if no GameProcessedEvent thenif UserInput.KeyCode == Enum.KeyCode thenHumanoid.WalkSpeed = 16elseif UserInput.KeyCode == Enum.KeyCode<"W"> thenHumanoid.WalkSpeed = 0endendendend)UserInputService.InputEnded:connect(function(UserInputEnded, GameProcessedEvent)if UserInputEnded.UserInputType == Enum.UserInputType.Keyboard climate if not GameProcessedEvent and also UserInputEnded.KeyCode == Enum.KeyCode thenHumanoid.WalkSpeed = 0endendend)
This does check out, although over there is one deadly flaw.

Users have the right to manipulate this by pressing A and D while go backwards, although this is obviously a offered considering you didn’t code v this in mind. (I’m additionally not certain if this defect is actually preventable?)

Not too certain on a fix.I’m open up to any and all ideas.


You can easily do the same with what i did for when you push W, the you can’t push A or D either, i spent one more minute configuring my code for ya.

local Player = game.Players.LocalPlayerlocal InputKey = "S"repeat wait() till Player.Characterlocal Humanoid = Player.Character:WaitForChild("Humanoid")Humanoid.WalkSpeed = 0local UserInputService = game:GetService("UserInputService")local movingSideways = falseUserInputService.InputBegan:connect(function(UserInput, GameProcessedEvent)if UserInput.UserInputType == Enum.UserInputType.Keyboard climate if no GameProcessedEvent thenif UserInput.KeyCode == Enum.KeyCode and also not movingSideways thenHumanoid.WalkSpeed = 16elseif UserInput.KeyCode == Enum.KeyCode<"W"> thenHumanoid.WalkSpeed = 0elseif UserInput.KeyCode == Enum.KeyCode<"A"> thenmovingSideways = trueHumanoid.WalkSpeed = 0elseif UserInput.KeyCode == Enum.KeyCode<"D"> thenmovingSideways = trueHumanoid.WalkSpeed = 0endendendend)UserInputService.InputEnded:connect(function(UserInputEnded, GameProcessedEvent)if UserInputEnded.UserInputType == Enum.UserInputType.Keyboard then if no GameProcessedEvent thenif UserInputEnded.KeyCode == Enum.KeyCode thenHumanoid.WalkSpeed = 0elseif UserInputEnded.KeyCode == Enum.KeyCode<"A"> thenmovingSideways = falseelseif UserInputEnded.KeyCode == Enum.KeyCode<"D"> thenmovingSideways = falseendendendend)EDIT: Forgot one thing.


This functions great!

I to be curious to check out whether any type of other concepts come through, so ns won’t note this as a solution just yet.

I’d prefer to check out if over there are any type of other methods that anyone has actually in mind, or if everyone else’s approaches evolve in ~ all.

Thank you, though!I considerably appreciate her input. (hehe the kinda sounds prefer a pun)


I had to deal with a tiny glitch therefore this is the final code, permit me recognize if you want me to describe anything (:

local Player = game.Players.LocalPlayerlocal InputKey = "S"repeat wait() until Player.Characterlocal Humanoid = Player.Character:WaitForChild("Humanoid")Humanoid.WalkSpeed = 0local UserInputService = game:GetService("UserInputService")local movingSidewaysA, movingSidewaysD = false, falseUserInputService.InputBegan:connect(function(UserInput, GameProcessedEvent)if UserInput.UserInputType == Enum.UserInputType.Keyboard then if no GameProcessedEvent thenif UserInput.KeyCode == Enum.KeyCode and also not movingSidewaysA and not movingSidewaysD thenHumanoid.WalkSpeed = 16elseif UserInput.KeyCode == Enum.KeyCode<"W"> thenHumanoid.WalkSpeed = 0elseif UserInput.KeyCode == Enum.KeyCode<"A"> thenmovingSidewaysA = trueHumanoid.WalkSpeed = 0elseif UserInput.KeyCode == Enum.KeyCode<"D"> thenmovingSidewaysD = trueHumanoid.WalkSpeed = 0endendendend)UserInputService.InputEnded:connect(function(UserInputEnded, GameProcessedEvent)if UserInputEnded.UserInputType == Enum.UserInputType.Keyboard then if no GameProcessedEvent thenif UserInputEnded.KeyCode == Enum.KeyCode thenHumanoid.WalkSpeed = 0elseif UserInputEnded.KeyCode == Enum.KeyCode<"A"> thenmovingSidewaysA = falseelseif UserInputEnded.KeyCode == Enum.KeyCode<"D"> thenmovingSidewaysD = falseendendendend)
pertained to think the it, was adding movingSidewaysA / D in reality needed?

I’m certain they’d both just administer the exact same use.

See more: How Long Does Bloody Mary Mix Last Unopened ? Ariel Williams

Would keeping it simply as movingSideways no heed the very same outcome?


You need it since otherwise you have the right to hold under A, climate D, relax D i beg your pardon would cause the password to count it that you aren’t moving sideways, so then you would be holding A still and then once you push W you would be able to move diagonally. It is really much necessary to stop that bug.