TextLabel
Defined in: server/api.d.ts:2857
Server-created replicated world-space text label.
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new TextLabel(
id):TextLabel
Defined in: server/api.d.ts:2862
Creates a wrapper for an existing text label; use TextLabel.create to spawn one.
Parameters
Section titled “Parameters”number
Existing text-label network entity identifier.
Returns
Section titled “Returns”TextLabel
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”destroy()
Section titled “destroy()”destroy():
void
Defined in: server/api.d.ts:2903
Destroys this replicated label; stale wrappers no longer resolve afterward.
Returns
Section titled “Returns”void
setColor()
Section titled “setColor()”setColor(
colorOrR,g?,b?,a?):void
Defined in: server/api.d.ts:2942
Changes the label’s packed ARGB color from a Core.Color or byte components.
Parameters
Section titled “Parameters”colorOrR
Section titled “colorOrR”number | Color
A Core.Color, or the red byte (0-255) when passing components.
number
Green byte (0-255) when passing components.
number
Blue byte (0-255) when passing components.
number
Alpha byte (0-255) when passing components; defaults to 255.
Returns
Section titled “Returns”void
setDrawDistance()
Section titled “setDrawDistance()”setDrawDistance(
distance):void
Defined in: server/api.d.ts:2921
Changes how far away clients can render the label.
Parameters
Section titled “Parameters”distance
Section titled “distance”number
Maximum rendering distance, clamped from 1 to 1000 world units.
Returns
Section titled “Returns”void
setFadeDistance()
Section titled “setFadeDistance()”setFadeDistance(
distance):void
Defined in: server/api.d.ts:2927
Changes the fade range approaching the draw-distance limit.
Parameters
Section titled “Parameters”distance
Section titled “distance”number
Distance over which the label fades out; negative values become zero.
Returns
Section titled “Returns”void
setFontSize()
Section titled “setFontSize()”setFontSize(
size):void
Defined in: server/api.d.ts:2915
Changes the rendered font size.
Parameters
Section titled “Parameters”number
Font size clamped from 6 to 128.
Returns
Section titled “Returns”void
setStyle()
Section titled “setStyle()”setStyle(
style):void
Defined in: server/api.d.ts:2933
Changes the label’s rendering style.
Parameters
Section titled “Parameters”number
Framework text-label style enum value; unsupported values are ignored.
Returns
Section titled “Returns”void
setText()
Section titled “setText()”setText(
text):void
Defined in: server/api.d.ts:2909
Changes the label’s displayed text.
Parameters
Section titled “Parameters”string
Replacement text replicated to clients.
Returns
Section titled “Returns”void
setVirtualWorld()
Section titled “setVirtualWorld()”setVirtualWorld(
world):void
Defined in: server/api.d.ts:2845
Moves this entity into another virtual world.
Parameters
Section titled “Parameters”number
Virtual-world identifier used to partition replication and visibility.
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”setVisibleTo()
Section titled “setVisibleTo()”setVisibleTo(
player):void
Defined in: server/api.d.ts:2851
Restricts replication of this entity to one owning connection while preserving normal range and visibility checks.
Parameters
Section titled “Parameters”player
Section titled “player”Entity | null
Player-owned entity whose connection should exclusively receive this entity, or null to clear the restriction.
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”toString()
Section titled “toString()”toString():
string
Defined in: server/api.d.ts:2898
Formats this label for logging and debugging.
Returns
Section titled “Returns”string
Text containing the label ID and current text.
Inherited from
Section titled “Inherited from”create()
Section titled “create()”
staticcreate(x,y,z,text,fontSize?,drawDistance?,virtualWorld?):TextLabel
Defined in: server/api.d.ts:2955
Creates and replicates a world-space text label, up to the server-wide limit of 512.
Parameters
Section titled “Parameters”number
World-space X coordinate.
number
World-space Y coordinate.
number
World-space Z coordinate.
string
Initial displayed text.
fontSize?
Section titled “fontSize?”number
Optional initial font size from 6 to 128.
drawDistance?
Section titled “drawDistance?”number
Optional initial draw distance from 1 to 1000 world units.
virtualWorld?
Section titled “virtualWorld?”number
Optional virtual-world identifier; defaults to the entity default.
Returns
Section titled “Returns”TextLabel
Handle for the newly created label.
Properties
Section titled “Properties”
readonlycolor:number
Defined in: server/api.d.ts:2872
Current packed ARGB color.
drawDistance
Section titled “drawDistance”
readonlydrawDistance:number
Defined in: server/api.d.ts:2882
Current maximum rendering distance in world units.
fadeDistance
Section titled “fadeDistance”
readonlyfadeDistance:number
Defined in: server/api.d.ts:2887
Current fade range in world units.
fontSize
Section titled “fontSize”
readonlyfontSize:number
Defined in: server/api.d.ts:2877
Current font size.
readonlyid:number
Defined in: server/api.d.ts:2818
Immutable network entity identifier.
Inherited from
Section titled “Inherited from”position
Section titled “position”position:
Vector3
Defined in: server/api.d.ts:2828
Authoritative world-space position; assignment forces replicated state.
Inherited from
Section titled “Inherited from”rotation
Section titled “rotation”rotation:
Vector3|Quaternion
Defined in: server/api.d.ts:2833
Authoritative rotation; reads return a quaternion and assignments accept a quaternion or Euler angles in degrees.
Inherited from
Section titled “Inherited from”
readonlystyle:number
Defined in: server/api.d.ts:2892
Current framework text-label style enum value.
readonlytext:string
Defined in: server/api.d.ts:2867
Current replicated label text.
virtualWorld
Section titled “virtualWorld”
readonlyvirtualWorld:number
Defined in: server/api.d.ts:2823
Current virtual-world identifier.
