📗
Ezstatz Documentation
  • 👋Welcome
  • ☑️Setting Up
  • 🪧Guide
    • 🥇Making Leaderboards via Ezstatz
    • 💾Managing Player Data
  • 🖥️API Reference
    • 📝Creator Functions
    • 🔄Getter Functions
    • ✅Setter Functions
    • ➕Comparison Functions
    • 💾Data Functions
  • ⚙️Settings Module
Powered by GitBook
On this page
  1. Guide

Managing Player Data

If you plan on testing your scripts that use the module in Studio, playtest your game in the Roblox client first. Otherwise, the Player Data functions may not work as intended.

With Ezstatz, managing player data is quite different. Instead of using Roblox's DataStoreService, Ezstatz comes with built-in functions that allows easy player data management.

If you'd like to learn about the Datastore functions, check Data Functions.

Continuing on, we can get a player's leaderstats data as follows:

It is recommended you wrap getData() in a pcall as it has a possibilty of erroring.

local success, data = pcall(function()
    return Ezstatz:getData(player)
end)
if success then
    print(data)
end

Most likely, the player will currently, and most likely have no data. However, we can set the data by running this function:

It is recommended you wrap saveData() in a pcall as it has a possibilty of erroring.

local success, message = pcall(function()
    Ezstatz:saveData(player)
end)
if not success then
    warn(message)
end
PreviousMaking Leaderboards via EzstatzNextAPI Reference

Last updated 1 year ago

🪧
💾