> ## Documentation Index
> Fetch the complete documentation index at: https://docs.projectreal.gg/llms.txt
> Use this file to discover all available pages before exploring further.

# getrenv

> Returns the Roblox global environment table. The function takes no arguments and returns exactly one value.

<div className="real-function-page">
  ```lua theme={null}
  getrenv(): table
  ```

  ## 返回值

  <ResponseField name={"environment"} type={"table"}>
    The Roblox global environment table.
  </ResponseField>

  ## 示例

  Read the Roblox global environment table returned by Real.

  ```lua theme={null}
  local robloxEnv = getrenv()

  print(type(robloxEnv))
  print(rawget(robloxEnv, "_G"))
  print(rawget(robloxEnv, "shared"))
  ```
</div>
