Emit||doc136355

September 20, 2022

Format

BindableEvent:Emit(...)

Describe

Launch events. You can pass in multiple group parameters.

parameter

Variable name Type Describe
tuple Multivariate group parameters

Code example

Bind and launch global custom events for players to purchase props.

Event:RegisterCustomEvent("OnPlayerBuyItem")
local bindableEvent = Event:GetEvent("OnPlayerBuyItem")
bindableEvent:Bind(function(player, itemName)
    print("OnPlayerBuyItem", player.name, itemName)
end)

local player1 = {
    name = "zzy",
    id = 1
}
bindableEvent:Emit(player1, "testItem")