Skip to content

Leaderstats Types

LeaderstatsConfig

Configuration type for automatic leaderstats integration.

lua
export type LeaderstatsConfig = {
    [string]: ValuePath  -- Display name -> data path
}

Example:

lua
local leaderstatsConfig: LeaderstatsConfig = {
    ["💰 Coins"] = "Coins",
    ["⭐ Level"] = "Level",
    ["👍 Likes"] = "Plot.Likes",
    ["🏆 High Score"] = "Stats.HighScore"
}

Notes:

  • Keys are the display names shown in leaderstats
  • Values are paths to the actual data
  • Supports nested paths with dot notation
  • Numbers automatically use IntValue, others use StringValue

PlayerState - High-Performance Roblox Data Management