Using contextactionservice, how can I move the WASD keys to the arrow keys?

I am trying to make a soccer game, similar to FIFA pc controls that are keyboard focused. WASD can not be the way for the player to move because there are the basic keybinds.

I need to move the WASD keys to their counterpart in the arrow keys (<, >, ^, etc)

If anyone knows, it would be nice!

Nevermind, I figured it out.

Just playtest, go into your player in “Players”, then PlayerScripts
Copy the “PlayerModule” module, stop playtesting and put it in StarterPlayerScripts

After that just go to PlayerModule > ControlModule > Keyboard and replace the lines 121 to 130 with

	ContextActionService:BindActionAtPriority("moveForwardAction", handleMoveForward, false,
		self.CONTROL_ACTION_PRIORITY, Enum.KeyCode.Up)
	ContextActionService:BindActionAtPriority("moveBackwardAction", handleMoveBackward, false,
		self.CONTROL_ACTION_PRIORITY, Enum.KeyCode.Down)
	ContextActionService:BindActionAtPriority("moveLeftAction", handleMoveLeft, false,
		self.CONTROL_ACTION_PRIORITY, Enum.KeyCode.Left)
	ContextActionService:BindActionAtPriority("moveRightAction", handleMoveRight, false,
		self.CONTROL_ACTION_PRIORITY, Enum.KeyCode.Right)
	ContextActionService:BindActionAtPriority("jumpAction", handleJumpAction, false,
		self.CONTROL_ACTION_PRIORITY, Enum.PlayerActions.CharacterJump)

Remember you also need to put this in any other script so the camera doesnt move around with the arrow keys

game.ContextActionService:UnbindAction("RbxCameraKeypress")

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.