checkcallstack
Checks the call stack for executor or game frames.
Syntax
checkcallstack(filter?: string, level?: number) -> boolean
Parameters
| Parameter | Type | Description |
|---|---|---|
filter? | string | Combination of e (executor), g (game) and b (both). |
level? | number | Optional exact stack level to inspect instead of the whole stack. |
Returns
| Type | Description |
|---|---|
boolean | Whether a matching frame exists at or above the requested level. |
Description
checkcallstack inspects Luau call frames and classifies each closure as executor-owned or game-owned.
With a level argument only that frame is checked. Without one, the whole visible stack is scanned for a frame matching the filter.
Example
print(checkcallstack("b"))
print(checkcallstack("e", 1))
Notes
- Raw hooks bypass closure-level safety; always keep the returned handle so you can unhook.
- The default filter is b (both kinds).