> For the complete documentation index, see [llms.txt](https://docs.convai.com/api-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.convai.com/api-docs/zh/cha-jian-yu-ji-cheng/other-integrations/roblox/sample-game-1.md).

# 示例游戏 1

### [点击这里在 Roblox 中游玩游戏](https://www.roblox.com/games/11398111980/Convai-Roblox-Integration-Game)

### 获取游戏代码

下载游戏文件： [下载](https://storage.googleapis.com/convai-assets-storage/Convai%20Roblox%20Integration%20Game%20Code.rbxl)

{% hint style="info" %}
当前版本：Ver 1.1 - 简单角色 API 集成
{% endhint %}

<figure><img src="/files/d4b04eca08872bb92865cc04b09d983ecb61212f" alt=""><figcaption></figcaption></figure>

这是一个非常简单的游戏，你可以进入并尝试与你的角色进行一些示例对话。

{% hint style="warning" %}
需要记住的几点：

1. 游戏默认会加载一个示例角色。你可以与这个默认角色互动，也可以选择将其替换为你从我们的网站或通过我们的 API 创建的角色。只需在屏幕左下角相应的输入框中输入对应的角色 ID，按下 ENTER，即可开始。
2. 对于初学者，我们提供 50 段示例对话，他们可以与想要的角色进行这些对话，而无需设置 API Key。若要继续进行更多对话，请从我们的网站获取你的 API Key，并将其值输入到屏幕左下角相应的输入框中，然后按下 ENTER。
   {% endhint %}

### 游玩游戏：

要游玩游戏，请按照以下步骤：

1. 从我们的网站获取你的 API Key。在免费额度用尽后，继续在游戏中进行任何对话都需要它。
2. 从你在角色创建工具中创建的新角色获取角色 ID。\
   如果你还没有，也不用担心。游戏已预载一个示例角色供你探索。
3. 访问上面给出的游戏链接。<br>

   <figure><img src="/files/67ff4ad928a063ed7c55abdbe4edf9e6f0fdb4e0" alt=""><figcaption></figcaption></figure>
4. 点击绿色的 Play 按钮。这将为你本地打开 Roblox 供你游玩。
5. 你已准备好与角色对话

   <figure><img src="/files/770e3cd47233b71fcd53454d71bdd9b8b779423c" alt=""><figcaption></figcaption></figure>

   点击 **明白** 按钮，以关闭通知。不过先读一遍。\
   在屏幕左下角区域输入 API Key 和角色 ID。在每个文本框中输入对应的值并按 Enter。\
   记得按下 **ENTER** ，以便在输入该值后将其记录到后端。
6. 现在点击聊天框图标，或者按键盘上的“/”键开始对话。先说“Hi!”并按下 **ENTER**.<br>

   <figure><img src="/files/7660efad40b28b842a4584cb24f83c208d3d4d8c" alt=""><figcaption></figcaption></figure>
7. 就这样。你可以继续对话，并持续测试你的角色。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.convai.com/api-docs/zh/cha-jian-yu-ji-cheng/other-integrations/roblox/sample-game-1.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
