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
PlayerStateServerandPlayerStateClientDefaultDataandPlayerStateConfig- ProfileStore and Replica libraries
Default folder layout
PlayerState (Model)
├── PlayerStateServer
├── PlayerStateClient
├── DefaultData
├── PlayerStateConfig
└── Libraries
├── ProfileStore
└── ReplicaModule 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
└── DefaultDataOther 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.
- ProfileStore — ProfileStore on Roblox
- Replica — Replica 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:
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
- Quick start — Minimal server and client code
- Full setup —
DefaultData, saves, environment config - API reference — All functions