As of march 2023, AI_Playground will no longer receive feature updates. Being the only developer working on this project, I sadly can’t compete with Roblox’s recent Code Assist feature. You can however still use it, especially since Roblox’s one is very primitive.
Reported bugs will be fixed.
Introduction
After seeing the rise of ChatGPT (an AI language model which can understand human language and - to some extent - code), it made me wonder how this could be used on Roblox Studio for development purposes. Fast forward a few days, and here it is:
AI Playground is a plugin that incorporates OpenAI’s Davinci language model into Roblox Studio. This plugin can help you do repetitive tasks, it can answer some questions you may have about Studio and a lot of other things.
AI Playground uses HTTP requests to communicate with OpenAI services and create the desired result.
Features
AI Playground currently offers two features:
ASK
Ask let you ask Studio-related questions to the AI. It can explain a particular topic, look for mistakes in your code and even write scripts for you! It is the same as going to chat.openai.com but inside Roblox Studio.
DO
Do uses loadstring()
to edit your game depending on your input. The AI will analyze your prompt and return a Lua code that it thinks answer the best your question. This code will then be executed into your Studio.
Beginners Guide
The plugin on the Creator Marketplace is priced at 100 Robux. You can however download, use and distribute the .rbxm open-sourced file published under CC BY-SA 4.0.
AI_Playground 0.2.rbxm (28.1 KB)
Unfortunately, you can’t start right away and experiment freely. OpenAI requires you to set up an API Key before using their services. It is a bit of an inconvenience, but it shouldn’t add that much delay.
Before setting up your OpenAI API Key, you should do the regular installation process. To do that, get the plugin here and enable it by going into “Manage Plugins” on Roblox Studio (in the “Plugins” tab).
Note: AI Playground uses the
HTTP Requests
andScript Injection
permissions. HTTP Request is necessary to contact OpenAI’s servers. Script Injection is required for the DO feature to work properly.
Creating and getting your API key
- Visit this page and log in/register
- Click “create a new secret key”
- Copy this long string of characters
- Open the plugin on Roblox Studio and go on the settings page
- Paste your key into the “OpenAI API Key” field and press enter
More
I just created a Guilded server for this project. If you are interested, check it out here.
Apologies for any english mistakes, it’s not my primary language.