# WorldRankService

WorldRankService : `Instance`

## Overview

WorldRankService는 플레이어가 월드에서 획득한 점수를 리더보드 형태로 저장하고 조회할 수 있도록 제공되는 서비스입니다.

점수 증가(Increment) 및 점수 조회(GetScore)와 같은 핵심 기능을 통해 플레이어 간 경쟁을 유도하고, 월드와 아웃게임 환경 모두에서 순위 기반 콘텐츠를 손쉽게 구현할 수 있습니다.

등록된 점수는 백엔드에서 자동으로 내림차순 정렬되며, 월드 진입 전 앱(아웃게임)의 월드 상세 화면에 위치한 Top Scorer 섹션에도 표시됩니다.

이 서비스는 서버 환경에서만 동작하며, 클라이언트 스크립트에서는 호출할 수 없습니다.

## Properties

## Methods

### GetDisplayEnabled

캐릭터 상단에 순위와 점수를 표시하도록 설정되어 있는지 여부를 반환합니다.

#### Parameters

#### Return

| `boolean` | 순위 및 점수 표시 여부입니다. |
| --------- | ----------------- |

#### Code Samples

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

local Enabled = WorldRankService:GetDisplayEnabled()
```

### GetScore

리더보드에 등록된 해당 player의 현재 점수를 반환합니다.

#### Parameters

| `Player` Player | 현재 점수를 확인할 플레이어입니다. |
| --------------- | ------------------- |

#### Return

| `number` | 반환된 점수입니다. |
| -------- | ---------- |

#### Code Samples

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

local Score = WorldRankService:GetScore(player)
```

### IncrementScore

지정한 player의 점수 변화량을 리더보드에 등록합니다. 점수는 정수만 허용되며, 변화량은 양수만 입력할 수 있습니다. 입력 가능한 최대 변화량은 100,000이며, 이 값을 초과한 요청은 처리되지 않습니다.

#### Parameters

| `Player` Player | 점수를 등록할 플레이어입니다. |
| --------------- | ---------------- |
| `number` Score  | 점수 변화량입니다.       |

#### Return

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

#### Code Samples

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

local score = 1
WorldRankService:IncrementScore(player, score)
```

### SetDisplayEnabled

캐릭터 상단에 순위와 점수를 표시할지 여부를 설정합니다.

#### Parameters

| `boolean` InEnableDisplay | 순위 및 점수 표시 여부입니다. |
| ------------------------- | ----------------- |

#### Return

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

#### Code Samples

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

WorldRankService:SetDisplayEnabled(false)
```

## Events


---

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