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

# create_comm_channel

> Instance.new で新しい BindableEvent を作成し、その Instance reference を numeric channel ID の下で communication channel list に保存し、ID と BindableEvent Instance を返します。channel ID は current map size plus one から計算されます。Instance.new("BindableEvent") が stack に object value を残さない場合、この function は "Failed to make a BindableEvent" を発生させます。

<div className="real-function-page">
  ```lua theme={null}
  create_comm_channel(): integer | Instance
  ```

  ## 戻り値

  <ResponseField name={"channelId"} type={"integer"}>
    communication channel list に挿入される numeric channel ID。
  </ResponseField>

  <ResponseField name={"event"} type={"Instance"}>
    channel 用に保存され、caller に返される BindableEvent Instance。
  </ResponseField>

  ## 例

  Create a BindableEvent communication channel and keep the returned channel ID for later lookup.

  ```lua theme={null}
  local channelId, event = create_comm_channel()

  print(channelId)
  print(event)
  ```
</div>
