diff --git a/modules/sandbox.luau b/modules/sandbox.luau index b5e8afa..36e9d53 100644 --- a/modules/sandbox.luau +++ b/modules/sandbox.luau @@ -80,7 +80,11 @@ local function discoverAndReadScript(filePath: string): string end local function sandboxGetfenv(): {} - return table.freeze(SANDBOXED_ENV) + if table.isfrozen(SANDBOXED_ENV) then + return SANDBOXED_ENV.environment + end + + return {} end local function sandboxSetfenv(env: {}): never