AddSelection() creates a row with a flyout. A selection uses one of two picker modes:
Single-select is the default. You can omit
SingleSelect entirely, or set SingleSelect = true explicitly. Set MultiSelect = true to opt into multi-select behavior. Enabling both SingleSelect and MultiSelect raises an error.
Single-select picker
SingleSelect can be supplied as either:
Value. Turning the selected option off clears the stored value.
Multi-select picker
MultiSelect can also be supplied through InternalInfo.MultiSelect.
The stored value is always an array. Selecting an option adds its Value to the array; turning it off removes that value. The order is the order in which values were selected.
For multi-select option callbacks, the signature is:
Selection modes
Single-select is the default mode. These configurations are equivalent:MultiSelect = true when multiple options may be selected at once:
SingleSelect and MultiSelect are mutually exclusive. Do not enable both. InternalInfo.SingleSelect and InternalInfo.MultiSelect are aliases for the corresponding public flags.
AddButton() acts like an option in both picker modes. Other flyout components such as text boxes, sliders, and labels can still be added when needed.
The parent selection title and description tooltip support Roblox rich-text markup by
default:
RichText = false on the selection config or inside Info to opt out. This
setting applies to the parent row; nested options use their own component settings.
Option callbacks
An option can supply its own callback in either picker mode:selectionValue is the selected value or nil.
For multi-select, selectionValue is an array containing all selected values at that moment.
Configuration
Enables rich-text markup for the selection title and description tooltip. Set to
false to opt out. Info.RichText is also accepted.Enables single-select picker semantics. This is the default when
MultiSelect is not enabled. Do not enable MultiSelect at the same time.Enables multi-select picker semantics. When
true, this overrides the default single-select mode. The selection value is stored as an array. Do not enable SingleSelect at the same time.Initial value used when no saved value exists. Use a single value for
SingleSelect and an array of values for MultiSelect.Persists the current selection value under
Settings[InternalInfo.UniqueCommandId]. For multi-select selections, the saved value is an array. The saved value is restored on the next initialization.Stable command ID. A random ID is generated when omitted. Provide a stable ID when using
Save or startup persistence so saved data can be restored across runs.Adds a right-click menu for assigning or removing a keybind. The bound callback invokes the current selection callback path.
Adds a persisted Toggle Startup action to the context menu. In picker modes, enabling it runs the main selection callback during initialization using the restored value. Single-select passes one value; multi-select passes the restored array.
Clicking the parent row calls the main selection callback. Single-select passes the current value. Multi-select passes an array of selected values. Quick Commands also pass the selected value or selected array first, followed by any remaining arguments.
Saved selection + startup
UseSave = true with InternalInfo.UniqueCommandId and StartupAvailable = true to persist the picker value and optionally run it during startup.
Single-select startup
Multi-select startup
Startup[commandId] = true. The picker value is stored separately under Settings[commandId].
For example, a multi-select configuration can contain:
Quick Commands
A selection command can match an option byValue or display title. The matcher checks exact, prefix, and substring matches, trying longer multi-word matches before shorter ones.
For single-select selections, the first matched option is selected and any remaining arguments are forwarded to the callback.
For multi-select selections, multiple options can be supplied as separate arguments or as a comma-separated list. The supplied options replace the current selected-value array for that command invocation, and any remaining arguments are forwarded afterward.
hide true useful for applying an additional argument to the current selection.
Selection handle
For picker options, the library reads the option’s
Value, display title, callback, and an optional InternalInfo.UniqueCommandId. Other component flags are not propagated from the option config.