Skip to content

Latest commit

 

History

History
29 lines (21 loc) · 1.02 KB

README.md

File metadata and controls

29 lines (21 loc) · 1.02 KB

MessageBox

This module lets you manage and display custom message boxes in Roblox Luau. It is type-checked and contains these types:

  • MessageBox: for creating and displaying MessageBoxes
  • MessageBoxButton: for displaying buttons with functions on a message box.

Code Sample

Here is some basic usage of the MessageBox type.

local MessageBoxManager = require(game.ReplicatedStorage.MessageBox)

local NewMessageBox = MessageBoxManager.New() -- creates a new MessageBox
local LocalPlayer = game:GetService("Players").LocalPlayer

NewMessageBox.Title = "Hello world!"
NewMessageBox.Content = "This is my first message box." -- Note: the default box supports rich text

local MessageBoxOKButton: MessageBoxManager.MessageBoxButton = {
	Label = "OK",
	Callback = NewMessageBox.Hide,
}

NewMessageBox.Show(LocalPlayer)
-- The OK button in this example hides the message box, but you can also do this:
-- NewMessageBox.Hide()

Result