PcoWSkbVqDnWTu_dm2ix
We use cookies on this site to enhance your user experience
Collapse Sidebar

DevComputerMovementMode

StarterPlayer

DevComputerMovementMode

The DevComputerMovementMove StarterPlayer property lets the developer overwrite the player’s movement mode if the player is on a computer.

This is the default property for players joining the game. It can be changed for individual players by settings the Player/DevComputerMovementMode.

If set to UserChoice then the player’s movement mode will be determined by whatever the player set in the game settings. Otherwise, the mode will be set based on this property.

See Enum/DevComputerMovementMode for the different movement modes available. Lets developer overwrite the player’s movement mode if the player is on a computer.

Note

This property has no affect on players not on a computer.


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.

local player = game.Players.LocalPlayer

-- Set the player's movement mode on computers to keyboard and mouse
player.DevComputerMovementMode = Enum.DevComputerMovementMode.KeyboardMouse