πŸ“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.

circle-info

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

Last updated