Skip to content

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 ​

TopicDescription
Built-in typesboolean, string, number, Player, and other Luau primitives
Core and pathsPlayerData and path aliases
Batch and leaderboardBatch ops and leaderboard record types
Change infoListener change shapes
Server interfacePlayerStateServer typing
Client interfacePlayerStateClient typing
ReplicaReplica types
ConfigProfile and runtime configuration
LeaderstatsHUD mapping types
ExamplesType-safe patterns
ExtensionsCustom item and data extensions
GuardsValidation helpers
Performance typesCache and connection typing

PlayerState - High-Performance Roblox Data Management