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

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

Asked by 4 years ago

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
Good question.. You used to be able to use negative walkspeed but thats taken out now. cmgtotalyawesome 1418 — 4y

1 answer

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

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

0
I just get this error when I put that into a localscript within StarterCharacterScripts. corncob567 275 — 4y
0
23:19:01.432 - Workspace.corncob567.LocalScript:5: bad argument #2 to '?' (Vector3 expected, got number) corncob567 275 — 4y
Ad

Answer this question