> ## 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

> สร้าง BindableEvent ใหม่ด้วย Instance.new เก็บ Instance reference ของมันไว้ใน communication channel list ภายใต้ numeric channel ID แล้วคืน ID พร้อม BindableEvent Instance channel ID คำนวณจาก current map size plus one หาก Instance.new("BindableEvent") ไม่เหลือ object value บน stack, function จะ throw "Failed to make a BindableEvent"

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

  ## Returns

  <ResponseField name={"channelId"} type={"integer"}>
    Numeric channel ID ที่ถูก insert ใน communication channel list
  </ResponseField>

  <ResponseField name={"event"} type={"Instance"}>
    BindableEvent Instance ที่เก็บไว้สำหรับ channel และคืนให้ caller
  </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>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.