> 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/datatype/scriptconnection.md).

# ScriptConnection

## Overview

ScriptConnection은 이벤트에 루아 스크립트로 작성한 함수를 이어주는 연결 객체입니다.

이 객체는 Connect 호출 시 생성되며, 필요할 때 Disconnect 기능을 통해 이벤트 수신을 중단할 수 있도록 해주어 이벤트 관리에 중요한 역할을 합니다.

## Constructors

## Properties

### Connected

`boolean`

이벤트의 연결 상태를 나타내는 속성입니다.

Disconnect 메서드가 호출되면 false값이 반환됩니다.

#### Code Samples

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

local function EnterPlayer(player)
    print("EnterPlayer : ", player.Name)
end
Connection = Players.PlayerAdded:Connect(EnterPlayer)

if Connection.Connected then
    print("The connection is active.")
else
    print("The connection has been disconnected.")
end
```

## Methods

### Disconnect

이벤트의 연결을 해제하여, 더 이상 해당 신호를 수신하지 않도록 만듭니다.

#### Parameters

#### Return

| `void` |   |
| ------ | - |

#### Code Samples

```lua
Connection:Disconnect()
```

## Events

## See also

{% content-ref url="/pages/ZBw9jjPplLCBqveb9rch" %}
[이벤트](/korean/manual/script-manual/events-and-communication/event.md)
{% endcontent-ref %}
