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.
AI Playground currently offers two features:
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.
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.
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
Script Injectionpermissions. HTTP Request is necessary to contact OpenAI’s servers. Script Injection is required for the DO feature to work properly.
- 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
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.