Skip to content

Server writes, client reads, and Luau types. Pick an area or search for a symbol.

API Reference ​

Separate server and client entry points, plus types for Luau-style annotations.

No Built-in Client Requests

PlayerState does not ship RemoteEvents or RemoteFunctions. Clients cannot directly change saved data—expose your own remotes and validate everything on the server.

Where to read ​

AreaPurpose
Server APIWrites, batches, replication, offline tools, leaderboard, Shared Session — all functions
Client APIReads, IsReady, OnChanged, cache, leaderboard display helpers — all functions
Server eventsBeforeRelease, BeforeSave, ProfileLoaded, ProfileUnloaded, MigrationResult
TypesPlayerStateServer, PlayerStateClient, ChangeInfo, config shapes

Capsule summaries of recent API surface: What's new.

Patterns and ergonomics live in Examples, Best practices, and Guides — Leaderstats & paths—not repeated here.

Module locations ​

Default layout from the Creator Store model:

lua
local ReplicatedStorage = game:GetService("ReplicatedStorage")

local PlayerStateServer = require(ReplicatedStorage.Libraries.PlayerState.PlayerStateServer)
local PlayerStateClient = require(ReplicatedStorage.Libraries.PlayerState.PlayerStateClient)
local DefaultData = require(ReplicatedStorage.Libraries.PlayerState.DefaultData)
local Config = require(ReplicatedStorage.Libraries.PlayerState.PlayerStateConfig)

Adjust paths if you moved modules

Some teams move PlayerStateServer under ServerScriptService and update requires accordingly. See Installation — default folder layout.

Legacy migration & upgrades ​

Configure opt-in Legacy Data Migration in PlayerStateConfig — Migration.

Older behaviour notes (return values, IsReady(), automatic leaderstats): see What's new and Migration.

PlayerState - High-Performance Roblox Data Management