MessageBox:Show Asynchronous

Display the message box. By default the calling thread waits here until a choice is made, so code after Show can rely on the callback having run.

Syntax
Luau
MessageBox:Show() -> ()

Parameters

Call this method with a MessageBox receiver. The colon supplies self implicitly; a dot call must pass the receiver explicitly.

This function takes no arguments.

Returns

()

No values.

Usage notes

With Yield set to false, Show returns right away and the choice arrives later through the callback. A box can be shown once; calling Show again raises an error.

If the box was already closed with Close, Show returns without displaying it.

Example

Example
Luau
local box = MessageBox.new({Text = "Saved.", Yield = false})
box:Show()
print("This prints while the box is still open")