# TextLabel

TextLabel : `GuiObject`

## Overview

TextLabel은 Frame과 달리 사각형 영역에 텍스트를 표시할 수 있는 UI 요소입니다.

텍스트의 색상이나 투명도 조절은 TextColor3 및 TextTransparency 속성으로 제어할 수 있으며, 배경을 숨기고 이미지만 표시하고 싶다면 BackgroundTransparency를 1로 설정하면 됩니다.

TextLabel은 **클라이언트 환경**에서만 제어할 수 있습니다.

## Properties

### Bold

`boolean`

TextLabel에 표시되는 텍스트를 굵게(Bold) 렌더링할지 여부를 지정합니다.

#### Code Samples

```lua
local ScreenGui = script.Parent
local TextLabel = ScreenGui:WaitForChild("TextLabel")

TextLabel.Bold = true
```

### LocalizedText

`string`

현재 클라이언트의 로케일을 기준으로 자동 번역된 결과 문자열을 반환하는 읽기 전용 속성입니다.

Text 속성에 등록된 원본 문자열이 번역되었을 때, 실제 버튼에 표시되는 번역 결과를 확인할 때 사용합니다.

자동 번역은 AutoLocalize 속성이 true인 경우에만 적용됩니다.

#### Code Samples

```lua
local ScreenGui = script.Parent
local TextLabel = ScreenGui:WaitForChild("TextLabel")

print(TextLabel.LocalizedText)
```

### Text

`string`

TextLabel에 표시할 텍스트 값을 지정합니다.

텍스트는 색상, 투명도, 크기, 폰트, 정렬 등의 다양한 속성에 의해 시각적으로 표현됩니다.

또한 편집기(Properties 창)에서는 Shift + Enter를 사용해 줄바꿈을 입력할 수 있으며, 스크립트에서는 문자를 사용해 개행을 적용할 수 있습니다.

#### Code Samples

```lua
local ScreenGui = script.Parent
local TextLabel = ScreenGui:WaitForChild("TextLabel")

TextLabel.Text = "Hello"
```

### TextColor3

`Color3`

텍스트에 적용되는 색상을 지정합니다.

#### Code Samples

```lua
local ScreenGui = script.Parent
local TextLabel = ScreenGui:WaitForChild("TextLabel")

TextLabel.TextColor3 = Color3.new(255, 0, 0)
```

### TextScaled

`boolean`

텍스트가 TextLabel의 전체 영역을 채우도록 자동으로 크기를 조정할지 여부를 결정합니다.

이 기능을 사용하면 TextSize 값은 무시되며, TextWrapped는 자동으로 활성화됩니다.

#### Code Samples

```lua
local ScreenGui = script.Parent
local TextLabel = ScreenGui:WaitForChild("TextLabel")

TextLabel.TextScaled = true
```

### TextSize

`number`

텍스트의 크기를 Pixel 단위로 제어하며, 값이 클수록 텍스트가 더 크게 표시됩니다.

#### Code Samples

```lua
local ScreenGui = script.Parent
local TextLabel = ScreenGui:WaitForChild("TextLabel")

TextLabel.TextSize = 50
```

### TextTransparency

`number`

텍스트의 투명도를 지정합니다.

0은 완전한 불투명 상태를 의미하고, 1은 전혀 보이지 않는 상태를 의미합니다.

배경을 숨기고 텍스트만 표시하고 싶다면 BackgroundTransparency를 1로 설정하면 됩니다.

#### Code Samples

```lua
local ScreenGui = script.Parent
local TextLabel = ScreenGui:WaitForChild("TextLabel")

TextLabel.TextTransparency = 0.5
```

### TextWrapped

`boolean`

TextLabel의 텍스트가 요소의 영역을 넘어가지 않도록 자동으로 줄바꿈할지 여부를 지정합니다.

이 속성이 true로 설정되면 긴 문장은 TextLabel의 폭에 맞추어 여러 줄로 나누어 표시되며, 줄 분리는 공백 문자를 기준으로 처리됩니다.

#### Code Samples

```lua
local ScreenGui = script.Parent
local TextLabel = ScreenGui:WaitForChild("TextLabel")

TextLabel.TextWrapped = true
```

### TextXAlignment

`Enum.TextXAlignment`

텍스트가 TextLabel 영역에서 왼쪽, 가운데, 오른쪽 중 어디에 배치될지를 지정합니다.

#### Code Samples

```lua
local ScreenGui = script.Parent
local TextLabel = ScreenGui:WaitForChild("TextLabel")

TextLabel.TextXAlignment = Enum.TextXAlignment.Left
```

### TextYAlignment

`Enum.TextYAlignment`

텍스트가 TextLabel 영역에서 위쪽, 가운데, 아래쪽 중 어디에 배치될지를 지정합니다.

#### Code Samples

```lua
local ScreenGui = script.Parent
local TextLabel = ScreenGui:WaitForChild("TextLabel")

TextLabel.TextYAlignment = Enum.TextYAlignment.Top
```

## Methods

## Events

## See also


---

# 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.overdare.com/korean/development/api-reference/classes/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.
