# Folder（ロブロックス クラス）

> インスタンスを整理してまとめるための入れ物です。リーダーボードを作るときの「leaderstats」にも使います。

- URL：https://roblox.minecraft-okinawa.com/reference/classes/Folder/
- 公式：https://create.roblox.com/docs/reference/engine/classes/Folder
- 受け継いでいるクラス：Instance

## 使用例：リーダーボード（leaderstats）を作る

（Script／置く場所：ServerScriptService）

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

Players.PlayerAdded:Connect(function(player)
	local leaderstats = Instance.new("Folder")
	leaderstats.Name = "leaderstats"
	leaderstats.Parent = player

	local coins = Instance.new("IntValue")
	coins.Name = "Coins"
	coins.Value = 0
	coins.Parent = leaderstats
end)
```

英語の説明とメンバー一覧：Roblox Creator Documentation（CC BY 4.0）。日本語の解説はこのサイト独自のものです。

執筆：鈴木孝昌（現役プロジェクトマネージャー／プログラミング講師）／運営：沖縄マイクラ部 プログラミングスクール「クロスウェーブ」（https://minecraft-okinawa.com/）