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

# getloadedmodules

Returns every `ModuleScript` currently loaded on the client, implying that `require` has been called on it at least once.

```luau theme={null}
getloadedmodules(): {ModuleScript}
```

Most commonly used for reverse engineering - the name of the loaded module could give you some hints on what it does. Useful, when you're only inspecting ModuleScripts and not LocalScripts.

## Returns

`{ModuleScript}` - an array of every loaded `ModuleScript`. Every time you call `getloadedmodules`, it will give you a new array - edits don't carry between calls.

## Aliases

* `getmodules`

## Example

Print every loaded module's path and pick out names worth taking a look at - depending on your script.

<CodeGroup>
  ```luau Example 1 theme={null}
  <<<<<<< HEAD
  local modules = getloadedmodules()
  =======
  -- getloadedmodules(): {ModuleScript}
  >>>>>>> 50e30f53759b0538759af25c9b271514aa2c9290
  ```

  ```luau Example 2 theme={null}
  for i, v in pairs(getloadedmodules()) do
      print(`{i}: {v:GetFullName()}`)
  end
  ```
</CodeGroup>

<Tip>
  Always check parameters and return values when working with this library function.
</Tip>
