> For the complete documentation index, see [llms.txt](https://docs.overdare.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.overdare.com/korean/development/api-reference/classes/playergui.md).

# PlayerGui

PlayerGui : `Instance`

## Overview

PlayerGui는 플레이어가 게임에 접속할 때 자동으로 생성되는 클라이언트 전용 컨테이너로, Players 서비스 내 각 Player 인스턴스의 하위에 위치하며, 이 컨테이너는 UI를 플레이어의 화면에 표시하고 클라이언트 측 스크립트를 실행하기 위한 공간으로 사용됩니다.

플레이어가 게임에 접속하면, StarterGui 서비스의 모든 UI 요소가 PlayerGui로 한번만 복사됩니다.

이 컨테이너에 포함된 LocalScript는 해당 플레이어의 클라이언트에서 실행됩니다.

플레이어의 화면에 표시되는 StarterGui가 아닌 PlayerGui에 복제되어 표시되므로, 게임 중에 UI를 제어하려면 다음과 같이 StarterGui가 아닌 PlayerGui를 통해 접근해야 합니다:

```lua
local Players = game:GetService("Players")

local LocalPlayer = Players.LocalPlayer
local PlayerGui = LocalPlayer.PlayerGui

local ScreenGui = PlayerGui:WaitForChild("ScreenGui")
local TextLabel = ScreenGui:WaitForChild("TextLabel")

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

## Properties

## Methods

### GetGuiObjectsAtPosition

지정한 화면 좌표에 있는 UI 요소를 PlayerGui 하위의 모든 ScreenGui에서 찾아 배열로 반환하는 메서드입니다.

특정 ScreenGui의 하위 요소만 찾으려면 ScreenGui의 GetGuiObjectsAtPosition()을 사용합니다.

#### Parameters

| `number` x | 화면상의 X 좌표(픽셀)입니다. |
| ---------- | ----------------- |
| `number` y | 화면상의 Y 좌표(픽셀)입니다. |

#### Return

| `Array` | 해당 좌표에 있는 GuiObject 배열입니다. |
| ------- | -------------------------- |

#### Code Samples

```lua
local Players = game:GetService("Players")
local PlayerGui = Players.LocalPlayer:WaitForChild("PlayerGui")

local PositionX = 150
local PositionY = 200
local GuiObjects = PlayerGui:GetGuiObjectsAtPosition(PositionX, PositionY)
for _, guiObject in ipairs(GuiObjects) do
    print(guiObject.Name)
end
```

## Events
