Skip to content

Api > LuaEvents > InvokeLocalForAll()


LuaEvents.InvokeLocalForAll(LuaBehaviour script, string eventName, [optionalArguments] optional-arguments)⚓︎

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

Parameters:⚓︎

Name Type Description
script LuaBehaviour The current running script object from LUA.script.
eventName string The name of the local event.
optional-arguments [optionalArguments]

Usage⚓︎

---@type LuaBehaviour
local script;

---@type string
local eventName;

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


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