Skip to content

Sidebar

Access and control a per-player sidebar through the player.sidebar property. Sidebars use a local Scoreboard() instance and direct packets — no other player sees them.

Metatable name: "sidebar"

Creates or updates the sidebar. Auto-shows on first creation.

player.sidebar = {
title = "My Server",
lines = { "Welcome!", "", "Online: 42" }
}

Partial updates merge with existing state:

player.sidebar = { title = "New Title" }
player.sidebar = { lines = { "Line 1", "Line 2" } }
player.sidebar = { visible = false }

Destroys the sidebar.

player.sidebar = nil

Reading player.sidebar returns a sidebar object:

type: string

Current title. Assign to update (sends packet if visible).

type: table

Lines array (strings). Assign to replace all lines.

type: boolean

Whether the sidebar is shown. Read-only.

type: number

Number of lines. Read-only.

Sets or updates a specific line (1‑indexed).

  • n (number) — Line index
  • text (string) — Line text

Shows the sidebar.

Hides the sidebar.

Destroys the sidebar permanently.

local sb = player.sidebar
sb.title = "Updated Title"
sb.lines = { "Line A", "Line B", "Line C" }
sb:setLine(2, "Modified Line B")
sb:hide()
-- later
sb:show()
sb:destroy()

Sidebars are auto-destroyed on player disconnect and /ignis reload.