Components
Shared constructor options, typed handles and consistent state semantics.
Choose the right control#
Open full size ↗Common options#
| Option | Type | Default | Meaning |
|---|---|---|---|
| Name | string | Required | Nonempty label. Not a configuration identifier. |
| Description | string? | nil | Optional secondary text. |
| Disabled | boolean | false | Blocks user interaction; setters remain usable. |
| Callback | function? | nil | Protected handler; signature depends on the control. |
| Flag | string? | nil | Explicit unique configuration key. Stateful controls only. |
| Persist | boolean | true | Set false to exclude a registered value from snapshots. |
| Sensitive | boolean | false | Set true to exclude private values from snapshots. |
Flag, Persist and Sensitive apply to stateful controls. Buttons are not registered for persistence. A Flag is unique across the window and must be an ASCII identifier of 1–64 characters, beginning with a letter or number and containing only letters, digits, underscore or hyphen.
Common handle methods#
| Method | Returns | Behavior |
|---|---|---|
| GetValue() | Value | Reads the current typed value. Multi selections return a copy. |
| SetValue(value, notify?) | self | Silent by default; true calls Callback only after a changed normalized value. |
| SetDisabled(boolean) | self | Changes user availability without discarding the value. |
| IsDisabled() | boolean | Reads the requested disabled state. |
| Destroy() | nil | Removes this control and its subscriptions; safe to repeat. |
Ownership#
Constructors return handles, not Roblox instances. The public API controls state; manipulating internal Root, Control or Scope fields is not a supported extension. After destruction, stop using value getters/setters. Repeat Destroy is safe.
Validation and callbacks#
Invalid constructor arguments usually assert. Callback errors are protected and reported with warn. Configuration I/O instead returns ok, info. For a changed SetValue(value, true), your handler receives the normalized value; constructor defaults do not invoke Callback.