Gamepad input

Roblox accepts input from gamepads such as Xbox and PlayStation controllers. To simplify cross‑platform inputs, including gamepads, Roblox provides the Input Action System to define actions such as "jump," "sprint," or "shoot" and set up bindings for multiple hardware inputs to drive those actions.

When binding gamepad inputs, see common control schemas to create a consistent gamepad experience for players. After inputs are set, you can enhance the player's experience by including haptic feedback on supported controllers.

As you build out support for gamepads, remember to test frequently using a connected gamepad or the Controller Emulator in Studio.

Input type detection

In cross‑platform development, it's important that you determine and respond to the PreferredInput type a player is using, normally to ensure that UI elements like on-screen buttons and menus work elegantly and support interaction across devices.

For example, a console assumes that gamepads are the default input, but a player on PC or laptop may also choose to connect a bluetooth gamepad. In this case, mouse/keyboard remains a valid input for that player, but you can assume they want to switch to the connected gamepad as the primary input type.

See input type detection for more information.

Common control schemas

When considering specific control bindings for the Input Action System, it's best to establish consistency across different games. The following input bindings will help players immediately feel familiar and comfortable with gamepad controls.

InputCommon use cases
ButtonAAccepts player prompts or GUI selections. Alternatively used for primary actions such as jumping.
ButtonBCancels player prompts or GUI selections. Alternatively used for secondary actions such as a dodge, roll, or sprint.
Thumbstick1Generally associated with character movement.
Thumbstick2Generally associated with camera movement.
ButtonL2, ButtonR2Generally used for primary actions, such as shooting.
ButtonL1, ButtonR1, ButtonX, ButtonYSecondary actions such as reloading, targeting, or accessing an inventory or minimap.

Haptic feedback

Many gamepad controllers have motors built in to provide haptic feedback. Adding rumbles and vibrations can greatly enhance a player's experience and provide subtle feedback beyond visuals or audio.

Roblox supports haptics for PlayStation gamepads, Xbox gamepads, and the Quest Touch controller. Haptic feedback is managed through HapticEffect instances which can be set to a specific Type such as GameplayCollision or UIClick.

Once a HapticEffect is in place, you can initiate it through the Play() method, for instance:

local Workspace = game:GetService("Workspace")
local effect = Instance.new("HapticEffect")
effect.Type = Enum.HapticEffectType.GameplayExplosion
effect.Parent = Workspace
-- Play the haptic effect
effect:Play()

Controller emulation

Use Controller Emulator to test gamepad input directly in Studio without a physical controller connected. It shows a picture of the emulated device and lights up its controls as input arrives, which helps confirm that your UserInputService handlers and Input Action System bindings react the way you expect.

©2026 Roblox Corporation. Roblox, the Roblox logo and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.