# 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 %}


---

# 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/serviceprovider.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.
