Skip to main content

Mechanic

@4.0.3 · deprecated
Deprecated

Superseded by Binder, which does the same job with more filters and a cleaner API. Existing projects can keep using Mechanic; new ones should start with Binder.

danger

Versions before 4.0.3 are broken. Install 4.0.3 only.

A component-style binder that applies logic to CollectionService-tagged instances.

Mechanic watches a CollectionService tag and applies your logic to every matching instance, with filters for class name, ancestor and a custom predicate, per-instance data, shared data and a Trove per application. It is the older design that Binder grew out of.

Use it when​

  • You maintain a project already built on Mechanic.

Install​

Studio Wally​

Using the Studio Wally plugin:

  1. Open the widget.
  2. Search kashtheking/mechanic.
  3. Press download and choose Shared module (recommended for almost every package).

Wally​

Add this to the [dependencies] section of your wally.toml, then run wally install:

Mechanic = "kashtheking/mechanic@4.0.3"
local Mechanic = require(ReplicatedStorage.Packages.Mechanic)

Dependencies​

Wally installs these automatically:

Credits​

Trove and Signal are by sleitnick (RbxUtil).

API​

Every constructor, method, property and type is documented on the Mechanic API page, generated from the doc comments in init.luau. Each entry links to its line in the source.

Help​

Questions and bug reports: the Discord or a GitHub issue. See Help & contact for everything else.