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.
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.
Last updated