Status

Read-only text you update from code.

The smallest status#

Luau
local status = main:Status({ Text = "Connection" })
 
status:Set("connected")
Preview

My Script

v1.0

Status

idle

Options#

OptionTypeDefaultWhat it does
TextreqstringThe label on the left.
Defaultstring"-"The starting value on the right.
Callbackfunction(string)Called with the new text every time Set runs.
DescriptionstringA quieter second line.
IconstringAn icon shown before the label.
Savestring | booleanPersist the value under this key. true derives one from the section and label.
TooltipstringShown while the pointer is over the control.
DisabledbooleanfalseDims the control. There is nothing to refuse.
DisabledReasonstringShown as a tooltip while it is disabled.

Methods#

MethodReturnsWhat it does
Set(text)true, or false, reasonReplaces the value shown on the right and fires Callback. nil is refused
Set(text, true)trueThe same without firing Callback
Get()stringThe text currently shown

The user cannot change a status, so Callback only ever runs from your own Set. A saved status calls it once with the value it restored, the same as every other saved control. See Saving settings.

Using it#

A status is for anything the user should see but not change, such as a connection state or a count.

Luau
local found = main:Status({ Text = "Players found", Default = "0" })
 
game.Players.PlayerAdded:Connect(function()
    found:Set(tostring(#game.Players:GetPlayers()))
end)

Non-strings are fine

Values are coerced, so status:Set(42) works and shows 42. The tostring in the example above is there for clarity, not because it is needed.

For anything that needs attention right away, like a job finishing or failing, use a notification.