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

SelectionImageObject

GuiObject

GuiObject

This property overrides the default selection adornment (used for gamepads). For best results, this should point to a GuiObject|GUI.

Note that the SelectionImageObject overlays the selected GUI with the GuiObject/Size of the image. For best results when using a non-default SelectionImageObject, you should size the SelectionImageObject via the scale DataType/UDim2 values. This helps ensure that the object scales properly over the selected element.

The default SelectionImageObject is a blue and white square outline around the selected GUI element. In the image below, the selected GUI is a white Frame.

Default SelectionImageObject

For instance, changing the SelectionImageObject to a ImageLabel with red and white square outline image, GuiObject/BackgroundTransparency of 1, GuiObject/Size of UDim2(1.1, 0, 1.1, 0), and GuiObject/Position of UDim2(-0.05, 0, -0.05, 0) results in the image below:

Custom SelectionImageObject

Changing the SelectionImageObject for a GUI element only affects that element. To change the SelectionImageObject for all of a user’s GUI elements, you can set the PlayerGui/SelectionImageObject property.

To determine or set which GUI element is selected by the user, you can use the GuiService/SelectedObject property. The user uses the gamepad to select different GUI elements, invoking the GuiObject/NextSelectionUp, GuiObject/NextSelectionDown, GuiObject/NextSelectionLeft, and GuiObject/NextSelectionRight events.