Hi Creators,
Code Assist is now in beta release! We want to express our sincere gratitude for your feedback and are committed to iterating and building a better product for you!
Our goal is to help you code smarter and faster, harnessing your full potential and maximizing your time and impact. It’s currently designed for experienced scripters but will eventually be made more accessible to aspiring scripters as the model improves.
How it works
Code Assist is an AI assistant in Studio Script Editor that suggests lines or functions of code as you type, helping you code more efficiently and stay focused. Based on contexts from your comment and code, AI suggestions will be triggered in two ways:
-
Automatically when you pause on a line for a few seconds or when the AI model gets enough context for a suggestion.
-
Manually with hotkey (this can be customized through File > Advanced > Customize Shortcuts).
- Alt + \ (Windows)
- ⌥ + \ (MacOS)
Currently, you need to have a few lines of code to trigger a suggestion.
To accept the suggestion, press Tab , and then you can edit just as editing your own code. To ignore it, keep typing.
Example of how Code Assist works
To enable the beta in Studio, go to File > Beta Features, enable AI-Powered Code Completion, then accept the legal disclaimer. If you decide to opt out, simply uncheck the feature. You can opt in and out any time during the beta period.
Code Assist helps automate basic coding tasks so you can focus on creative work, but it does not always suggest perfect code (see detailed limitations in FAQ). It is still up to you to review, test, and determine if the code suggestion is contextually appropriate.
To get more accurate and relevant suggestions, we recommend you follow good coding practices regardless of AI assistance:
- Break down your code into smaller functions.
- Assign descriptive names for parameters, functions, and scripts.
- Consistently include well-written comments throughout your coding process.
Also, you can work on natural language hints to get better results (see FAQ for more information).
What’s next
We will continue to improve the model and user experience based on your feedback and needs. So, opt in to the beta and give it a try. We can’t wait to hear your thoughts and continue to improve our product.
Huge thanks to the team who made this happen: @Genichiroblox, @Regal_Corgi, @IcyTides, @ignotuscaligo, @MetalMax2, @swish741, @cthulwho, @lyocean, @iriszh, @windy0724, @MoonRocketApollo, @AndroidYouth, and many others for all their hard work on this feature.
FAQ
1. What data does Roblox use for AI model training purposes?
- Currently, we do not use any non-public data to train the models. The tool only uses a small subset of free marketplace assets for fine tuning large language models. The subset has passed various checks for quality and safety filters. If we plan to make changes to the model training approach, we will engage in open and transparent communication with our community.
2. Will my code be shared with other creators as suggestions?
- No. All suggestions are generated by the AI model, instead of transferring from one user to another. Since your code is not used for model training, it won’t be suggested to other users of Code Assist, with the one exception of code being posted to free marketplace items.
3. Will Code Assist replace scripters on the Roblox Platform?
- Code Assist is here to augment your programming skills, not replace them. It is positioned as a ‘sidekick’ that makes your coding tasks easy, while still leaving you in the driver’s seat. It can never match the creativity, domain knowledge, and problem-solving skills of an experienced developer. Also, like other AI powered tools, its suggestions have limitations (see details in question 6). Only you, the creator, can work on the creative part of your Roblox experiences, and use your judgment to review, refine, and vet the suggestions from AI.
4. As a non-scripter or new scripter, can I rely on Code Assist to create code for my experiences?
-
Code Assist is primarily designed to assist Roblox scripters in writing code more efficiently. Due to the limitations of the model, it still requires scripters to review and modify the code suggestions. Larger suggestions in particular have lower accuracy. Therefore, we expect that a typical workflow will be scripter writing code > Code Assist suggests > scripter accepts, iterates, and keeps writing.
For novice scripters, you are absolutely encouraged to use Code Assist. We would recommend starting with small projects such as “make the player jump when they touch the part”, or using it to generate code snippets that you can use as a starting point. You can also use it to help you learn more about programming concepts and syntax. However, it’s important to keep in mind that AI is not a substitute for learning and practicing scripting skills.
Meanwhile, we are exploring new ways to make scripting easier for aspiring scripters. Stay tuned.
5. How can I get better suggestions from the model?
Adding context with natural language hints can greatly improve the quality of predictions produced by the model.
-
Context: it works best in the context of a codebase rather than in an empty Script in an empty Place. Adding a few lines of code, such as defining a few variables before your prompt can improve the accuracy of its suggestions.
[Note] Currently, it only suggests when you have several lines of code in the script. -
Comments: Write descriptive comments describing the problem you are solving and what the inputs and outputs should be.
- You can also include some sample calls with expected results in comments to improve hints.
- You can suggest how to solve a problem (e.g. “use raycast”)
- Using the exact function or variable name as you defined also helps improve suggestion quality
-
Identifier naming: Pick descriptive names for identifiers such as functions and variables. Naming functions instead of anonymous functions can also signal better hints.
-
Script names: Pick a descriptive script name that captures the intent of what you are trying to do.
-
Casing: Appropriate use of case and delimiters and case (such as camelCase, CamelCase, or snake_case) coupled with good identifiers naming can provide the model with more hints.
6. What is the limitation of Code Assist?
-
Our suggestions are learned from a corpus of code, and can thus reflect some limitations of the code they are trained on. For example:
- Not using a newer API
- Using Lua instead of Luau
-
The tool may generate incorrect, misleading, or other information that is not useful for your purposes.
-
We have included filters to block offensive language, but they are not all-encompassing. There is a probability the tool may generate offensive or biased information. We will continue to improve the filter system to help our AI learn.
-
The suggestions may be the same, similar, or different among users, even with the same prompts. Your code, however, will never be shared with others.
-
The suggestion may be incomplete due to the limited length of output from the models.
-
There is a daily cap for the number of AI suggestions. You will get no suggestions once the cap is reached until the next day.
-
Not all manual triggering generates suggestions.
7. Who is responsible for the code suggested by Code Assist?
- You are responsible for the code you write with Code Assist’s help. Roblox makes no warranty about content or information through or from the tool. We recommend that you review, test, and vet the suggestions before putting it into your experiences.
Happy coding!