Server Functions
Server-side PlayerState API for data management and persistence.
Server Only - Security
Server scripts only. No built-in RemoteEvents - create your own with validation.
Never trust client data!
Studio: ViewedUser
When using ViewedUser in PlayerStateConfig (Studio-only), setting ReadOnly to true causes all write APIs (Set, SetPath, SetValues, batch ops, Increment, Decrement, array/dict writes, WipePlayerData, etc.) to return false and warn. Reads and Replica subscriptions still work. See Configuration — ViewedUser.
Reference sections
| Topic | Description |
|---|---|
| All functions | Alphabetical index of every server API symbol |
| Initialization | Init |
| Basic data | Set, Get |
| Paths | SetPath, GetPath |
| Change listeners | OnChanged |
| Numeric | Increment, Decrement |
| Batch | SetValues, BatchSetValues, BatchUpdateValues, FlushBatch |
| Arrays | Array helpers |
| Dictionaries | Dict helpers |
| Cache | Path cache |
| Shared session | Server-wide ephemeral state |
| Events | Signals |
| Utilities | Profiles, Replica, offline, wipe, etc. |
| Leaderboard & leaderstats | Rankings and HUD stats |
| Examples | Larger patterns |
| Performance | Optimization notes |