Types
PlayerState uses TypeScript-style type annotations for better code safety and IntelliSense support.
Autocomplete from DefaultData
With the New Type Solver, Studio autocompletes your DefaultData keys and paths in Get, Set, GetPath, SetPath, OnChanged, Increment, and the array and dictionary functions (server and client), plus shared session keys and leaderboard stat names. You don't need to add type annotations, and any string still works. See Installation — Studio autocomplete.
Type reference sections
| Topic | Description |
|---|---|
| Built-in types | boolean, string, number, Player, and other Luau primitives |
| Core and paths | PlayerData and path aliases |
| Batch and leaderboard | Batch ops and leaderboard record types |
| Change info | Listener change shapes |
| Server interface | PlayerStateServer typing |
| Client interface | PlayerStateClient typing |
| Replica | Replica types |
| Config | Profile and runtime configuration |
| Leaderstats | HUD mapping types |
| Examples | Type-safe patterns |
| Extensions | Custom item and data extensions |
| Guards | Validation helpers |
| Performance types | Cache and connection typing |