ReferenceScripts

getscripts

Lists every script in the client, wherever it is, including ones parented to nil.

Syntax

getscripts() -> {LuaSourceContainer}

Also available as

get_scripts

Returns

TypeDescription
{LuaSourceContainer}Every LocalScript, Script and ModuleScript the client has loaded.

Description

Unlike game:GetDescendants(), the list includes scripts outside the game tree and scripts in places your identity cannot browse.

Example

for _, script in getscripts() do
    if script:IsA("LocalScript") then
        print(script:GetFullName())
    end
end

These are Game executor contracts. Check build requirements and session lifetimes before using them.