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.

Syntax
Luau
messagebox(text: string, caption: string, flags: number) -> number

Parameters

Function parameters
ParameterTypeDescription
textstringMessage displayed in the dialog.
captionstringDialog title.
flagsnumber32-bit integer selecting the dialog flags.

Returns

number

A numeric button or result code, rather than a boolean.

Usage notes

The call can suspend while the dialog is open.

Example

Example
Luau
local result = messagebox("Your example export is ready.", "Export", 0)
print("Dialog result:", result)
Kawaii documentation