Skip to content

Installation

Get the PlayerState model into your place. For first code, use Quick start; for DefaultData and config, see Full setup.

Get the model

TIP

The Roblox model includes all dependencies. If you use the default layout, you do not need a manual ProfileStore or Replica install.

Download from the Creator Store (ProfileStore and Replica included):

What's included

Default folder layout

PlayerState (Model)
├── PlayerStateServer
├── PlayerStateClient
├── DefaultData
├── PlayerStateConfig
└── Libraries
    ├── ProfileStore
    └── Replica
Module placement options

You can reorganize modules. Update require paths in the server and client modules if you move files.

Common pattern:

ReplicatedStorage
└── Libraries
    └── PlayerState
        ├── PlayerStateServer  → often parented to ServerScriptService
        ├── PlayerStateClient
        └── DefaultData

Other layouts (ServerScriptService + StarterPlayer scripts, etc.) are fine — keep server and client requires consistent with your tree.

Manual installation (advanced)

Install dependencies separately

Only needed if you are not using the Roblox model or you moved libraries out of the bundle.

  1. ProfileStoreProfileStore on Roblox
  2. ReplicaReplica on GitHub

Update require paths inside PlayerStateServer and PlayerStateClient if dependencies live elsewhere.

Configuration pointer

Datastore name, scope, and client cache live in PlayerStateConfig. See Configuration for the full reference — not duplicated here.

Verification

Optional: verify require paths

After placing modules, confirm Init runs — same flow as Quick start:

lua
local PlayerState = require(game.ReplicatedStorage.Libraries.PlayerState.PlayerStateServer)

game.Players.PlayerAdded:Connect(function(player)
    if PlayerState.Init(player) then
        print("PlayerState OK for", player.Name)
    end
end)

Next steps

PlayerState - High-Performance Roblox Data Management