The Closures library classifies, wraps, hooks, restores, and compares Luau closures. Most tooling that touches remotes or the game’s own functions is built on it, so the pages here are precise about the distinctions that matter.

Two kinds of closure

Luau has two closure representations, and several functions here only make sense once you can tell them apart. Only Luau closures have bytecode, constants, upvalue refs, and a hash. The functions that read those, getfunctionhash and the bytecode-based debug functions, reject C closures for that reason.

Functions

Aliases

Several functions are also registered under their common alternate names, so scripts written for other environments run unchanged.