> ## 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.

# Environment

> Access to runtime environments and garbage-collected objects.

Access to runtime environments and garbage-collected objects.

| Function navigation                      | Description                                                                                                                                                                                                                                                                                                                                                |
| ---------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [`filtergc`](./filtergc)                 | Searches live garbage-collected tables or functions that match the supplied filters. filterType must be "table" or "function". options must be a table.                                                                                                                                                                                                    |
| [`getgc`](./getgc)                       | Returns an array table of live Luau garbage-collected objects visible to the API. Functions and userdata-like objects are included by default. Tables are included only when includeTables is true. get\_gc\_objects is an alias.                                                                                                                          |
| [`getgenv`](./getgenv)                   | Returns the current executor environment table by pushing LUA\_ENVIRONINDEX. The function takes no arguments, returns exactly one value, and has no registered alias. Repository call-sites use the returned table to read and write shared executor globals such as \_\_siApiCache and saveinstance.                                                      |
| [`getrenv`](./getrenv)                   | Returns the Roblox global environment table. The function takes no arguments and returns exactly one value.                                                                                                                                                                                                                                                |
| [`getscriptglobals`](./getscriptglobals) | Returns a new table containing the current LUA\_GLOBALSINDEX values for \_G and shared. The function takes no arguments, creates a fresh table, assigns \_G from LUA\_GLOBALSINDEX.\_G and shared from LUA\_GLOBALSINDEX.shared, and returns exactly one value. It does not return the full global table, and no alias is registered for getscriptglobals. |
| [`gettenv`](./gettenv)                   | Returns the environment table stored on a Luau thread. getstateenv is an alias.                                                                                                                                                                                                                                                                            |
| [`setclipboard`](./setclipboard)         | Writes one value to the Windows system clipboard as text. The value is converted to a string. The function returns no status value, whether the clipboard write succeeds or fails. toclipboard is an alias.                                                                                                                                                |
| [`setrbxclipboard`](./setrbxclipboard)   | Writes a required string to the Windows clipboard using Roblox Studio clipboard data format. The function returns no status value, whether the clipboard write succeeds or fails.                                                                                                                                                                          |
