💾Managing Player Data

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:

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:

local success, message = pcall(function()
    Ezstatz:saveData(player)
end)
if not success then
    warn(message)
end

Last updated