# TextLabel

For examples on how to use, refer to [UIService](/scripting/bedwars-scripting/services/uiservice.md).

### Functions

#### setText(text: string)

Sets the font of the text.

#### setFont(font: [Font](https://create.roblox.com/docs/reference/engine/enums/Font))

Sets the font of the text from the [Roblox Enum for Fonts](https://create.roblox.com/docs/reference/engine/enums/Font). Written as `Font.Arial`.

#### setPosition(position: [Vector3](https://create.roblox.com/docs/reference/engine/datatypes/Vector3))

Sets the position of the label.

#### getPosition(): [Vector3](https://create.roblox.com/docs/reference/engine/datatypes/Vector3)

Returns the position of the label.

#### setTextColor(color: [Color3](https://create.roblox.com/docs/reference/engine/datatypes/Color3))

Sets the color of the text on the label.

#### setBackgroundColor(color: [Color3](https://create.roblox.com/docs/reference/engine/datatypes/Color3))

Sets the color of the background of the label.

#### setTextTransparency(transparency: number)

Sets the transparency of the text on the label. Transparency ranges from 0 (opaque) to 1 (invisible).

#### setBackgroundTransparency(transparency: number)

Sets the transparency of the background of the label. Transparency ranges from 0 (opaque) to 1 (invisible).

#### setSize(size: [UDim2](https://create.roblox.com/docs/reference/engine/datatypes/UDim2))

Sets the size of the label.

#### setSize(): [UDim2](https://create.roblox.com/docs/reference/engine/datatypes/UDim2)

Returns the size of the label.

#### setMaxDistance(distance: number)

Sets the max distance at which the label can still be seen.

#### destroy()

Removes the label.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.easy.gg/scripting/bedwars-scripting/objects/textlabel.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
