📗
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
  • createLeaderstatsObject(player: Player): Folder
  • createValue(player: Player, name: string, valType: valueType): ValueBase
  1. API Reference

Creator Functions

Known as constructor functions, these create objects.

createLeaderstatsObject(player: Player): Folder

Creates a Leaderstats folder into the specified Player object and returns it.

Example

The code below will create a new leaderstats object each time a player joins the game, and will print it's Name property and the Player's name that the Folder is being parented to.

local Ezstatz = require(game.ServerScriptService:WaitForChild("Ezstatz"))

game.Players.PlayerAdded:Connect(function(player)
    local leaderstats = Ezstatz:createLeaderstatsObject(player)
    print(leaderstats.Name, player.Name)
end)

createValue(player: Player, name: string, valType: valueType): ValueBase

Creates and returns a Value based on the given valType

Below is a list of Value objects currently supported by the valType parameter.

Most Value objects are not supported at this time, however more support will come as updates follow.

Parameter Name
Value Object

int

IntValue

str

StringValue

Example

-- Creating an integer based value
local cash = Ezstatz:createValue(player, "Cash", "int")

-- Creating a string based value
local rank = Ezstatz:createValue(player, "Rank", "str")
PreviousAPI ReferenceNextGetter Functions

Last updated 1 year ago

🖥️
📝