|
1 | 1 | --- |
2 | 2 | title: Assistant |
3 | | -description: How to use the Assistant to help you build, grow, and monetize your creations. |
| 3 | +description: How to use Assistant to help build, grow, and monetize your creations. |
4 | 4 | --- |
5 | 5 |
|
6 | | -import BetaAlert from '../includes/beta-features/beta-alert.md' |
| 6 | +**Assistant** is an AI helper that accelerates content creation by helping you get started, supplementing your skills, and assisting with ongoing development. It can do the following and much more: |
7 | 7 |
|
8 | | -**Assistant** is an AI helper that can answer questions about building, growing, and monetizing Roblox creations. It is trained on the official Roblox documentation and is designed to answer these categories of questions: |
9 | | - |
10 | | -- **Building** — Answers questions about [creating an experience](../creation.md) in Studio. |
11 | | -- **Scripting** — Generate simple [scripts](../scripting/index.md) and/or ask for an explanation of Lua code. |
12 | | -- **Growing** — Answers questions about improving an existing experience by leveraging its [analytics](../production/analytics/index.md). |
13 | | -- **Monetizing** — Answers questions about how to [monetize](../production/monetization/index.md) your experience. |
| 8 | +- Answer how to do things on Roblox |
| 9 | +- Add and edit objects and scripts directly in your place's data model |
| 10 | +- Insert objects from the Creator Store |
| 11 | +- "Explain this code" by selecting parts of a script in the Script Editor |
| 12 | +- Create materials to restyle your objects |
14 | 13 |
|
15 | 14 | <Alert severity="info"> |
16 | 15 | [Built with Meta Llama 3](https://llama.meta.com/llama3/license/) |
17 | 16 | </Alert> |
18 | 17 |
|
19 | | -## Using Assistant |
| 18 | +## Studio Features |
20 | 19 |
|
21 | | -Assistant is accessible from both the official [Documentation](../) site and within [Studio](../studio/index.md). |
| 20 | +You can access Assistant from [Studio](../studio/index.md) and the [documentation](/assistant), but Studio has the larger set of features. In Studio, Assistant consists of a large language model (LLM) that generates code and a run-command module (similar to the existing [command bar](../studio/ui-overview.md#command-bar)) that runs code. |
22 | 21 |
|
23 | | -### From Documentation |
| 22 | +As a result, Assistant can act directly on your data model, such as inserting and modifying objects, writing and inserting scripts, and automating repetitive tasks like modifying properties in bulk. |
24 | 23 |
|
25 | | -To access Assistant from the official [Documentation](../) site: |
| 24 | +For a more in-depth look at what Assistant can do and how to use it, see the [Prompt Guide and Examples](prompt-engineering.md) and the following Roblox Staff livestream for tips, tricks, and inspiration. |
26 | 25 |
|
27 | | -1. In the upper navigation bar, click the **Assistant** button. |
| 26 | +<iframe width="640" height="360" src="https://www.youtube.com/embed/vMaOGgeuR4Y?si=fuX-80mMMzhQB6sn&start=240" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe> |
28 | 27 |
|
29 | | - <img src="../assets/assistant/Documentation-Button.png" width="650" /> |
| 28 | +### Insert and Modify Scripts |
30 | 29 |
|
31 | | -1. Select a premade question or type your own. See [Prompting Tips](#prompting-tips) for guidance on generating improved responses. |
| 30 | +Assistant can insert new scripts, modify existing ones, and perform these actions across multiple objects as necessary. For example, if you ask it to create a remote event, it can create a local script, a server script, and the event all at once. |
32 | 31 |
|
33 | | - <img src="../assets/assistant/Documentation-Prompts.png" width="790" /> |
| 32 | +If you enter a script generation request like "Make the player's character jump when they touch this part," Assistant shows the script's contents and adds the new script instance to the currently selected object in the data model. If nothing is selected, Assistant decides where to place it based on your prompts. |
34 | 33 |
|
35 | | -1. Based on the result, you can then: |
| 34 | +<img src="../assets/assistant/Studio-Script-Insert.png" width="360" alt="Requested script inserted into selected part." /> |
36 | 35 |
|
37 | | - - Click thumbs up or thumbs down to rate the result and improve future results. |
38 | | - - Click the redo icon to process a new result. |
| 36 | +The generated script might not function flawlessly. In these cases, you can either make further edits in the [Script Editor](../studio/script-editor.md) or ask Assistant to edit the script it just created. It can even act on existing scripts that it didn't create if you need help with code that you've written yourself. |
39 | 37 |
|
40 | | - <img src="../assets/assistant/Documentation-Options.png" width="790" /> |
| 38 | +### Insert and Modify Objects |
41 | 39 |
|
42 | | -### In Studio |
| 40 | +Assistant can create, edit, delete and iterate on instances in your data model, including inserting items from the Creator Store. |
43 | 41 |
|
44 | | -<BetaAlert betaName="Assistant Preview" leadIn="The Studio tooling is currently in beta through " leadOut="." components={props.components} /> |
| 42 | +<img src="../assets/assistant/Studio-Object-Insert.png" width="532" alt="Assistant adding objects through the Studio prompt." /> |
45 | 43 |
|
46 | | -To access Assistant from Studio: |
| 44 | +If you examine the code, you can see that Assistant calls `Class.InsertService:GetFreeModels()` to query the Creator Store for a wheelbarrow model and uses `Class.Model:PivotTo()` to place it near a tree. |
47 | 45 |
|
48 | | -1. Click the **Assistant** button in the top-right corner of Studio. |
| 46 | +### Provide Answers and Suggestions |
49 | 47 |
|
50 | | - <img src="../assets/studio/general/Toolbar-Assistant.png" width="754" alt="Assistant button indicated in top-right area of toolbar" /> |
| 48 | +If you need general knowledge or help while creating an experience, you can ask Assistant questions like how to make a team system, how to design a game loop, how to use specific Studio tools, and much more. It can even explain code that it generated or that you wrote yourself. |
51 | 49 |
|
52 | | -2. Type a request into the field near the bottom of the window, using guidance from [Prompting Tips](#prompting-tips) to generate improved responses. Based on the result, you can then: |
| 50 | +<img src="../assets/assistant/Studio-Explain-Code.png" width="360" alt="Code explanation provided by Assistant in Studio." /> |
53 | 51 |
|
54 | | - - Click thumbs up or thumbs down to rate the result and improve future results. |
55 | | - - Click the redo icon to process a new result. |
56 | | - |
57 | | - <img src="../assets/assistant/Studio-General-UI.png" width="360" alt="General user interface for Assistant in Studio" /> |
58 | | - |
59 | | -#### Quick Style |
| 52 | +### Generate Materials |
60 | 53 |
|
61 | 54 | When given a request to generate a material, Assistant in Studio can quickly style existing parts through a lightweight implementation of the [Material Generator](../studio/material-generator.md). |
62 | 55 |
|
63 | | -<img src="../assets/assistant/Studio-Quick-Styling-Material.png" width="360" alt="Material variations shown in Assistant for quick styling" /> |
64 | | - |
65 | | -#### Insert Script |
| 56 | +<img src="../assets/assistant/Studio-Quick-Styling-Material.png" width="360" alt="Material variations shown in Assistant for quick styling." /> |
66 | 57 |
|
67 | | -If you enter a script generation request like _"Make the player's character jump when they touch this part,"_ Assistant will show the script's contents and add the new script instance to the currently selected object in the data model. If nothing is selected, Assistant will make the placement decision based on your prompts. |
68 | | - |
69 | | -<img src="../assets/assistant/Studio-Script-Insert.png" width="360" alt="Requested script inserted into selected part" /> |
70 | | - |
71 | | -<Alert severity="info"> |
72 | | -At times, the generated script may not function flawlessly. In such cases, you can either make further edits in the [Script Editor](../studio/script-editor.md), or select the script snippet and ask Assistant to modify it. |
73 | | -</Alert> |
| 58 | +## Accessing Assistant |
74 | 59 |
|
75 | | -#### Explain Code |
| 60 | +Assistant is available in two locations: Studio and the documentation. |
76 | 61 |
|
77 | | -If you enter a request to explain code and you have a code snippet selected in the [Script Editor](../studio/script-editor.md), Assistant explains what that selected snippet does. |
78 | | - |
79 | | -<img src="../assets/assistant/Studio-Explain-Code.png" width="360" alt="Code explanation provided by Assistant in Studio" /> |
80 | | - |
81 | | -## Prompting Tips |
82 | | - |
83 | | -The following prompting tips enable Assistant to provide a more detailed and helpful response. |
84 | | - |
85 | | -### Context and Details |
86 | | - |
87 | | -The more context and examples you can provide in your prompts, the better. Instead of asking _"How can I design a core loop?"_ provide specific contextual examples, such as: |
88 | | - |
89 | | -<blockquote> |
90 | | - |
91 | | -_Help me design a fun core loop for my game. I want to build a game where players can hunt treasure as pirates. They can also buy and upgrade pirate ships and battle each other._ |
| 62 | +### In Studio |
92 | 63 |
|
93 | | -</blockquote> |
| 64 | +To access Assistant from Studio: |
94 | 65 |
|
95 | | -### Multi-Step Prompts |
| 66 | +1. Click the **Assistant** button in the top-right corner. |
96 | 67 |
|
97 | | -Consider using a multi-step prompt to encourage Assistant to think. Instead of simply asking _"Can you explain this script to me?"_ and pasting in the script, ask it to explain step-by-step by separating the question from the script with `###`. Doing so enables Assistant to deconstruct and organize the information clearly to provide better answers. |
| 68 | + <img src="../assets/studio/general/Toolbar-Assistant.png" width="754" alt="Assistant button indicated in top-right area of toolbar." /> |
98 | 69 |
|
99 | | -<Tabs> |
100 | | -<TabItem label="Prompt"> |
101 | | -<blockquote> |
| 70 | +2. Type a request into the field near the bottom of the window, using guidance from the [Prompt Guide](prompt-engineering.md) to generate improved responses. |
102 | 71 |
|
103 | | -_Can you explain what this script is doing step by step?_ |
| 72 | + - Click thumbs up or thumbs down to rate the result and improve future results. |
| 73 | + - Click the redo icon to process a new result. |
104 | 74 |
|
105 | | -**\###** |
| 75 | + <img src="../assets/assistant/Studio-General-UI.png" width="360" alt="General user interface for Assistant in Studio." /> |
106 | 76 |
|
107 | | -_local part = workspace.Part_ |
| 77 | +### From the Documentation |
108 | 78 |
|
109 | | -_local function onTouched(otherPart)_<br /> |
110 | | - _print(part.Name .. " collided with " .. otherPart.Name)_<br /> |
111 | | -_end_ |
| 79 | +To access Assistant from the [documentation](/assistant): |
112 | 80 |
|
113 | | -_part.Touched:Connect(onTouched)_ |
| 81 | +1. In the upper navigation bar, click the **Assistant** button. |
114 | 82 |
|
115 | | -**\###** |
| 83 | + <img src="../assets/assistant/Documentation-Button.png" width="650" /> |
116 | 84 |
|
117 | | -</blockquote> |
118 | | -</TabItem> |
119 | | -<TabItem label="Assistant Response"> |
120 | | -<blockquote> |
| 85 | +1. Select a premade question or type your own. See the [Prompt Guide](prompt-engineering.md) for guidance on generating improved responses. |
121 | 86 |
|
122 | | -_Certainly! This script is an example of how to handle collisions between two parts in Roblox. Let's break it down step by step:_ |
| 87 | + <img src="../assets/assistant/Documentation-Prompts.png" width="790" /> |
123 | 88 |
|
124 | | -1. `local part = workspace.Part`: _This line of code creates a local variable named `part` and assigns it the value of the `Part` object located in the workspace. You can replace `Part` with the name of the specific part you want to detect collisions with._ |
125 | | -2. `local function onTouched(otherPart)`: _This line of code defines a function named `onTouched` that takes in a parameter `otherPart`. This function will be called whenever the part collides with another part._ |
126 | | -3. `print(part.Name .. " collided with " .. otherPart.Name)`: _This line of code prints a message to the output console, indicating that the `part` has collided with `otherPart`. The `part.Name` and `otherPart.Name` are concatenated using the `..` operator to form the message._ |
127 | | -4. `part.Touched:Connect(onTouched)`: _This line of code connects the `onTouched` function to the `Touched` event of `part`. Whenever the part collides with another part, the `onTouched` function will be called._ |
| 89 | + - Click thumbs up or thumbs down to rate the result and improve future results. |
| 90 | + - Click the redo icon to process a new result. |
128 | 91 |
|
129 | | -</blockquote> |
130 | | -</TabItem> |
131 | | -</Tabs> |
| 92 | + <img src="../assets/assistant/Documentation-Options.png" width="790" /> |
0 commit comments