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

# ServiceProvider

ServiceProvider : `Instance`

## Overview

Workspace, Player와 같은 서비스 객체를 반환하는 추상 기반 클래스입니다.

## Properties

## Methods

### FindService

지정한 이름의 서비스가 존재하면 해당 서비스를 반환합니다.

이름이 잘못되었거나 서비스가 아직 생성되지 않은 경우에는 오류가 발생합니다.

#### Parameters

| `string` InClassName | 반환받을 서비스의 클래스 이름입니다. |
| -------------------- | -------------------- |

#### Return

| `Instance` | 반환된 서비스의 인스턴스입니다. |
| ---------- | ----------------- |

#### Code Samples

```lua
local Workspace = game:FindService("Workspace")
local InvalidService = game:FindService("InvalidService")
```

### GetService

지정한 이름의 서비스가 존재하면 해당 서비스를 반환합니다.

전달된 이름이 유효한 서비스일 경우, 해당 서비스가 이미 존재하면 그대로 반환하고, 아직 생성되지 않았다면 자동으로 생성한 후 반환합니다.

#### Parameters

| `string` InClassName | 반환받을 서비스의 클래스 이름입니다. |
| -------------------- | -------------------- |

#### Return

| `Instance` | 반환된 서비스의 인스턴스입니다. |
| ---------- | ----------------- |

#### Code Samples

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

## Events

## See also

{% content-ref url="/pages/Q4AqDeeftHwFiIem8nYH" %}
[오브젝트 참조](/korean/manual/script-manual/get-started/object-reference.md)
{% endcontent-ref %}
