PcoWSkbVqDnWTu_dm2ix
The Developer Hub is now deprecated and information on this page may no longer be accurate. To see our new and improved documentation, please click here. You can read more about the future of documentation here.
Collapse Sidebar

DevComputerMovementMode

Player

DevComputerMovementMode

The DevComputerMovementMode property determines the manner in which a player moves their character when using a mouse-and-keyboard device device. See Enum/DevComputerMovementMode for a description of each movement control mode available. This property cannot be set using a LocalScript (it must be set on the server using a Script).

The default value of this property is determined by StarterPlayer/DevComputerMovementMode.

Note

  • The word “Computer” in this property name refers to non-UserInputService/TouchEnabled|TouchEnabled devices.
  • When set to UserChoice, a player can choose between any control mode (except Scriptable) in the Roblox game settings. In general, it is a good idea to allow players to choose their control mode to maximize accessibility.
  • It is possible to create a custom control scheme by setting this property to Scriptable.
  • This property does not affect players using a touch enabled device. See Player/DevTouchMovementMode instead.


Code Samples


Setting a Player's Movement Mode (Desktop)

The example demonstrates how to set the movement mode for players on computers.

In this example, we set the movement mode to KeyboardMouse via the Enum/DevComputerMovementMode enum. This means that players on computers control their characters using their keyboard and mouse.