isexecutorthread

Checks whether a thread was created by Volt.

Syntax

isexecutorthread(thread?: thread) -> boolean

Parameters

ParameterTypeDescription
threadthread?Thread to inspect; defaults to the current thread

Returns

TypeDescription
booleanTrue when the thread is an executor thread

Example

print(isexecutorthread()) -- true for a normal Volt script thread

local runningScript = getrunningscripts()[1]
local gameThread = runningScript and getscriptthread(runningScript)

if gameThread then
    print(isexecutorthread(gameThread)) -- false
end