# DataStoreService

DataStoreService : `Instance`

## Overview

DataStoreService는 서버 환경에서 데이터 저장소에 접근할 수 있도록 하는 기능을 제공합니다.

## Properties

## Methods

### GetDataStore

입력된 이름을 기반으로 새로운 DataStore 객체를 만들어 반환합니다. 만약 같은 이름으로 다시 호출하면 이전에 생성된 동일한 인스턴스를 재사용하게 됩니다.

#### Parameters

| `string` InName     | DataStore 객체의 이름입니다.                                                      |
| ------------------- | ------------------------------------------------------------------------- |
| `string` InScope    | DataStore 내부에서 키를 구분하기 위한 범위(scope) 문자열입니다. 비워둘 수 있으며, 입력 시 50자 이내여야 합니다. |
| `Instance` InOption | DataStore 생성 시 추가 동작을 지정하기 위한 옵션 인스턴스입니다. 지정하지 않으면 기본 설정으로 생성됩니다.         |

#### Return

| `GlobalDataStore` | 반환된 DataStore 객체입니다. |
| ----------------- | -------------------- |

#### Code Samples

```lua
local DataStoreService = game:GetService("DataStoreService")
local GoldStore = DataStoreService:GetDataStore("PlayerGold")
```

### GetGlobalDataStore

시스템에서 제공하는 기본 전역 데이터 스토어를 반환합니다. 특정 이름을 가진 별도의 데이터 저장소에 접근하려면 GetDataStore 함수를 사용해야 합니다.

#### Parameters

#### Return

| `GlobalDataStore` | 반환된 GlobalDataStore 객체입니다. |
| ----------------- | -------------------------- |

#### Code Samples

```lua
local DataStoreService = game:GetService("DataStoreService")
local GlobalStore = DataStoreService:GlobalDataStore()
```

## Events

## See also

{% content-ref url="/pages/qR9T5h2LzZt8YVAA07D4" %}
[Saving & Loading Data](/korean/manual/script-manual/advanced-gameplay-systems/datastore.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/datastoreservice.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.
