messagebox Asynchronous
messageboxasync
Show a message dialog and return the result code for the selected button. Use it for a short notice or a dialog whose selected button controls the next step. Read the numeric result rather than testing it as a boolean.
Luau
messagebox(text: string, caption: string, flags: number) -> numberParameters
| Parameter | Type | Description |
|---|---|---|
text | string | Message displayed in the dialog. |
caption | string | Dialog title. |
flags | number | 32-bit integer selecting the dialog flags. |
Returns
numberA numeric button or result code, rather than a boolean.
Usage notes
The call can suspend while the dialog is open.
Example
Luau
local result = messagebox("Your example export is ready.", "Export", 0)
print("Dialog result:", result)