Scriptsgetscriptfromthread
Scripts

getscriptfromthread

Reads the script reference associated with a thread.

Related to sUNC documentation

This page follows the official sUNC reference.

Signature

Luau
function getscriptfromthread(thread: thread): BaseScript | ModuleScript | nil

Returns

The associated script or nil.