Syntax
get_comm_channel(channelId: number): Instance | nilArguments
| Name | Type | Description |
|---|---|---|
channelId | number | Communication channel ID to look up. |
Returns
| Name | Type | Description |
|---|---|---|
event | Instance | nil | BindableEvent 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)