tw.text3d
Side: Client
Floating 3D text rendered in the world. Must be called every frame to remain visible.
Functions
tw.text3d.draw(options)
Draws floating text at the given world coordinates for the current frame.
| Parameter | Type | Description |
|---|---|---|
options | table | Drawing options (see below) |
Options:
| Field | Type | Default | Description |
|---|---|---|---|
x | number | — | World X coordinate |
y | number | — | World Y coordinate |
z | number | — | World Z coordinate |
text | string | — | Text to display |
scale | number? | 0.30 | Text scale |
background_alpha | integer? | 180 | Background opacity (0-255) |
The text is rendered with a black background and white text, offset +0.5 in Z from the given coordinates.
Examples
Display text in a loop
lua
CreateThread(function()
while true do
Wait(0)
tw.text3d.draw({
x = -301.62,
y = 783.04,
z = 117.75,
text = "Press E to interact",
})
end
end)Custom scale and transparency
lua
CreateThread(function()
while near_target do
Wait(0)
tw.text3d.draw({
x = coords.x,
y = coords.y,
z = coords.z,
text = "General Store",
scale = 0.45,
background_alpha = 120,
})
end
end)Notes
draw()renders text for one frame only. Call it inside awhile trueloop withWait(0)to keep it visible.- The Z position is automatically offset by
+0.5so the text floats above the given coordinates. - Best used for interaction hints near objects or NPCs.

