πCreator Functions
Known as constructor functions, these create objects.
createLeaderstatsObject(player: Player): Folder
createLeaderstatsObject(player: Player): FolderCreates 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
createValue(player: Player, name: string, valType: valueType): ValueBaseCreates and returns a Value based on the given valType
Below is a list of Value objects currently supported by the valType parameter.
Parameter Name
Value Object
int
IntValue
str
StringValue
Example
Last updated