Skip to main content

LuaEvents.InvokeLocalForMaster(LuaBehaviour script, string eventName, [optionalArguments] optional-arguments)

Like InvokeForMaster() but invokes the local event that defined in the exact similar game object and Lua Script in all the master client. This requires for that game object to be existed during the build or instantiated using network methods.

Parameters:

NameTypeDescription
scriptLuaBehaviourThe current running script object from LUA.script.
eventNamestringThe name of the local event.
optional-arguments[optionalArguments]Optional parameters to pass.

Usage

---@type LuaBehaviour
local script;

---@type string
local eventName;

---@type [optionalArguments]
local optional-arguments;


LuaEvents:InvokeLocalForMaster(script, eventName, optional-arguments)