Codectionary / Developer documentation / Luau

BillboardGui

Show a label in the 3D world that faces the viewer.

Why use BillboardGui?

BillboardGui attaches an interface to a world target while orienting it toward the camera. It is useful for nameplates or object hints; it is not a fixed screen overlay.

Try it in Roblox Studio

Create a Part named SignPost in Workspace. Put this LocalScript in StarterPlayerScripts and run a client in Studio.

Syntax

billboard.Adornee = post

Examples

BillboardGui

Display a label above a world object.

local playerGui = game:GetService("Players").LocalPlayer:WaitForChild("PlayerGui")
local post = workspace:WaitForChild("SignPost")
assert(post:IsA("BasePart"))
local billboard = Instance.new("BillboardGui")
billboard.Adornee = post
billboard.Size = UDim2.fromOffset(180, 40)
billboard.StudsOffsetWorldSpace = Vector3.new(0, 3, 0)
billboard.Parent = playerGui

local label = Instance.new("TextLabel")
label.Size = UDim2.fromScale(1, 1)
label.Text = "Information"
label.Parent = billboard
  1. Adornee places the BillboardGui relative to SignPost; the world-space offset lifts it above the part.
  2. The BillboardGui lives in this player’s PlayerGui, so the example is client-specific.
  3. The child TextLabel fills the billboard area and supplies the visible text.

Best practices

  • Limit on-screen clutter when many world labels overlap.
  • Use a background and text colors that remain legible over changing scenery.

Runtime & versions

Luau host; Roblox engine examples require Roblox Studio. Feature availability depends on the language and runtime version used by your project; consult the official reference below.

Luau documentation

Specifications & further reading