Skip to main content

Script.StartCoroutine(function coroutineFunction, [optionalArguments] args)

Starts the passed function as a coroutine function.

Parameters:

NameTypeDescription
coroutineFunctionfunctionThe name of the function to be started as a coroutine. Must have at least one coroutine.yield() call with in it.
args[optionalArguments]Arguments to passed as parameters to the coroutine function.

Usage

---@type Script
local script;

---@type function
local coroutineFunction;

---@type [optionalArguments]
local args;


script.StartCoroutine(coroutineFunction, args)