Skip to content

Collectible

Picked up on touch (a coin, a gem): adds to the player’s stat, hides, and comes back later.

  • Inherits: Behavior → Instance
  • Creatable: Yes: new Collectible(), or Instance.new('Collectible', parent).
  • Replication: Server only: it, and everything inside it, is never sent to clients.

Picked up on touch: adds to the player’s stat, hides, and comes back later.

Type: string · Default: 'Coins' · Access: read/write · Replicates: no

The player’s stat it adds to (made if they don’t have it; ‘’ adds nothing).

Type: number · Default: 1 · Access: read/write · Replicates: no

How much it adds (negative takes away).

Type: number · Default: 10 · Range: 0 to 86,400 (clamped) · Access: read/write · Replicates: no

Seconds until it comes back (0 = it can be picked up only once).

Type: boolean · Access: read-only

True while it’s picked up and hidden.

Inherited from Behavior: enabled, running

Inherited from Instance: name, archivable, id, className, parent, destroyed

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

Inherited from Instance: changed, childAdded, childRemoved, descendantAdded, descendantRemoving, ancestryChanged, destroying, attributeChanged