Actors

get_comm_channel

Returns the BindableEvent for a communication channel ID, or nil when no channel exists for that ID.

Syntax

get_comm_channel(channelId: number): Instance | nil

Arguments

NameTypeDescription
channelIdnumberCommunication channel ID to look up.

Returns

NameTypeDescription
eventInstance | nilBindableEvent Instance for the channel ID, or nil when the ID is not present.

Description

Returns the BindableEvent for a communication channel ID, or nil when no channel exists for that ID.

Call it with 1 parameter(s): channelId. The argument table explains which values are required and which ones only refine the behavior.

It returns event (Instance | nil). Use the returns table to separate successful values from nil results and recoverable errors.

Example

Look up the BindableEvent Instance stored for a communication channel ID.

local channelId = create_comm_channel()
local event = get_comm_channel(channelId)

print(event)