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

Is There A Way to Invert A Player's Movement?

I am unsure of how I would even begin to do this, but I want to know if there is a fairly simple way to invert a players movement (i.e, 'A' acts as 'D', 'W' acts as 'S', etc). Is this possible? If so, how?

1 comment

1

Good question.. You used to be able to use negative walkspeed but thats taken out now.

1 answer

Put inside to playerCharacterSripts

Edit

 local hrp = script.Parent.HumanoidRootPart
 local oldPosition = Vector3.new(hrp.Position)

 game:GetService(“RunService”).RenderStepped:connect(function()
  local Raduis = (oldPosition - hrp.Position)
  hrp.Position = oldPosition + (Raduis * -1)
  oldPosition = Vector3.new(hrp.Position)
end)

That should invert the movement

2 comments

0

I just get this error when I put that into a localscript within StarterCharacterScripts.

0

23:19:01.432 - Workspace.corncob567.LocalScript:5: bad argument #2 to '?' (Vector3 expected, got number)

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