Write a value into a live GC table slot (direct heap write, MUTATES STATE)
write-path-valueWrite live Roblox game state by resolving a Luau table expression and assigning container[key], returning old and new values for auditing.
Instructions
WRITES LIVE GAME STATE. Direct heap write into one slot of a Luau table: resolve a Luau expression to a TABLE container, then assign container[key] = , returning BOTH the OLD and NEW value so the change is auditable. This is the write counterpart to read-path-value and the natural action after a memscan locates a field — e.g. flip a config flag ('require(game.ReplicatedStorage.Config)', key='GodMode', value true), bump a cached stat ('getgenv().PlayerData', key='Coins', value=9999), or clear a slot (kind='nil'). The container expression is evaluated as return <containerExpr> and MUST resolve to a table (anything else returns a clean { error }). For non-primitive values (Vector3, Color3, Enum, an Instance, a table, …) use kind='raw' and pass a Luau expression. The read of the old value and the write are each pcall-guarded. WARNING: this mutates running client memory immediately; writing through a metatable-protected/readonly table may error (returned as { error }) and some game state replicates or is server-authoritative. Requires loadstring/load. Returns { Container, Key, OldValue, NewValue, ok } or { error }. Signature: { containerExpr: string, key: string, value: { kind: "string" | "number" | "boolean" | "nil" | "raw", value: string | number | boolean? }, threadContext: number? }. Phase: act; cost=medium; idempotency=contextual-write. Requires: active-client, explicit-mutation-approval. Produces: operation-receipt. Verify with: assert-state. Safety: MUTATING; writes live game/client state. On failure: inspect tool-schema for exact fields, defaults, constraints, and an invocation example.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | The string key (field name) within the container table to write, e.g. 'Coins', 'GodMode', 'WalkSpeed'. Indexed as container[key]. (String keys only — for non-string keys, write via a raw containerExpr that already indexes to the parent.) | |
| value | Yes | typed value consumed by this operation. | |
| containerExpr | Yes | Luau expression resolving to the TABLE whose slot you want to write, e.g. 'getgenv().PlayerData', 'require(game.ReplicatedStorage.Config)', '_G.Settings', or any table reference found via a heap scan. Evaluated as `return <containerExpr>` and must resolve to a table. | |
| threadContext | No | Optional Roblox thread identity for this call; omit it to use the server default. |