> ## Documentation Index
> Fetch the complete documentation index at: https://docsuncv2.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# get_comm_channel

Returns the event for an already-opened channel (by its id).

```luau theme={null}
get_comm_channel(id: number): BindableEvent?
```

```luau highlight={8} theme={null}
local id, channel = create_comm_channel()
channel.Event:Connect(function(data)
    print(data) -- Hello, World!
end)

run_on_actor(getactors()[1], [[
    local id = ...
    local channel = get_comm_channel(id)
    channel:Fire("Hello, World!")
]], id)
```

`id` is the number that `create_comm_channel` gave you back when the channel was opened. Used on the receiving side of an actor split: a  should call `get_comm_channel(id)` to reach the same one. The result is a Roblox [`BindableEvent`](https://create.roblox.com/docs/reference/engine/classes/BindableEvent), so use `:Fire(...)` to send messages and `.Event:Connect(...)` to receive them, or `.Event:Wait()` to yield until the next one arrives.

## Parameters

| Parameter | Type     | Description                                |
| --------- | -------- | ------------------------------------------ |
| `id`      | `number` | The channel id from `create_comm_channel`. |

## Returns

[`BindableEvent`](https://create.roblox.com/docs/reference/engine/classes/BindableEvent)? - the event for that channel, or `nil` if no channel was ever opened with that id.

## Example

The main thread opens a channel and starts a `run_on_actor` worker thread with the id. The worker thread resolves the same channel with `get_comm_channel` and fires a message back to the main thread.

<CodeGroup>
  ```luau Example 1 theme={null}
  local get_comm_channel = get_comm_channel(10)
  ```

  ```luau Example 2 theme={null}
  -- main thread
  local id, channel = create_comm_channel()

  channel.Event:Connect(function(payload)
      print(`worker said: {payload}`)
  end)

  -- hand the id to the worker, e.g. as a run_on_actor argument
  run_on_actor(actor, workerScript, id)
  ```
</CodeGroup>

<Tip>
  Always check parameters and return values when working with this library function.
</Tip>
