Leaderstat
Gives every player a stat (a NumberValue in their leaderstats folder), shown in the player list.
- Inherits: Behavior → Instance
- Creatable: Yes:
new Leaderstat(), orInstance.new('Leaderstat', parent). - Replication: Server only: it, and everything inside it, is never sent to clients.
Gives every player a stat, shown as a column in the player list. The stats are the players’ state: turning it off or moving it keeps them as they are (it gives them again, unchanged, when it runs again); removing it removes the stats it made.
Properties
Section titled “Properties”statName
Section titled “statName”Type: string · Default: 'Coins' · Access: read/write · Replicates: no
The stat’s name: its column in the player list.
Type: number · Default: 0 · Access: read/write · Replicates: no
What each player starts with.
Inherited from Behavior: enabled, running
Inherited from Instance: name, archivable, id, className, parent, destroyed
Methods
Section titled “Methods”Inherited from Behavior: activate
Inherited from Instance: getPropertyChangedSignal, setAttribute, getAttribute, getAttributes, getAttributeChangedSignal, getChildren, getDescendants, findFirstChild, findFirstChildOfClass, findFirstChildWhichIsA, findFirstAncestor, findFirstAncestorWhichIsA, waitForChild, isA, isDescendantOf, isAncestorOf, getFullName, clearAllChildren, destroy, clone, toString
Events
Section titled “Events”Inherited from Instance: changed, childAdded, childRemoved, descendantAdded, descendantRemoving, ancestryChanged, destroying, attributeChanged