Game and API availability

Apex scripting runs in the selected joined game. A function documented here is not a promise that it is available in every client state.

Execution readiness

Wait for the selected instance to report that its executor is ready before submitting a script. The engine profile, current game state and enabled features determine which functions are available.

Use narrow searches and handle absent APIs explicitly. An empty result means no matching values were observed in the queried context; it does not prove that a server-only object or another Actor's data does not exist.

Globals and environments

Ordinary assignments stay in a submission's child environment. Use getgenv() for values shared by submitted scripts in that joined game. Its _G points to the shared Apex table, and shared is a separate Apex table. The game keeps its own globals.

getrenv() is a view with inherited game globals, not a raw copy. rawget and ordinary indexing therefore answer different questions. getfenv() exposes a mutable environment and invalidates optimized builtin imports. Do not mark a modified environment untouched merely to change this result.

Sessions, Actors and asynchronous work

Refresh handles after teleports, reconnects or client restarts. Actor states own their objects; use the supported submission and communication APIs rather than resuming a foreign thread or transferring raw pointers. A getgc() result belongs to the calling VM.

A queued submission or returned starter is not proof that deferred code completed. task.defer and later waits belong to the engine task library. Close sockets and remove drawings when finished.

Errors and compatibility

Check optional functions with type before calling them and use pcall for operations that can fail. Preserve the original error, selected Apex and engine versions, context and smallest reproduction. Do not log credentials, cookies or device identifiers.

Compilation, example syntax checks and one successful call prove different things. Examples are illustrative; endpoints, object paths and available services must fit your own test environment. Hashes and bytecode are not universal across engine/compiler upgrades. Decompilation is a reconstruction, not guaranteed original source.

Apex is a local compatibility-testing executor and launcher for games you own or are authorized to test. This reference describes accessible client behavior and does not promise server-only source or server authority.