getscriptfromthread
Maps a coroutine back to the script that created it.
Signature
getscriptfromthread(thread: thread): BaseScript?Parameters
threadthreadThe thread to resolve.
Returns
BaseScript?
Example
local thread = coroutine.running()
print(getscriptfromthread(thread)) --> nil, the executor owns this thread