As a Roblox developer, it is currently too hard to pass startup information from external tools like Rojo to Studio which hinders the efficiency of mine and others development processes.
I am working on implementing a specific Rojo feature called rojo open
. This command will build a place file, open it in Studio, start serving a Rojo server, and automatically connect to the server from the Rojo plugin in Studio. For this to work, the plugin must be informed of which server it should connect to. There are potential approaches, but they have drawbacks:
- Injecting an Instance into the place file with server connection info: This method modifies the place file, potentially introducing unwanted changes for the user (especially if they add places files to version control). It may be possible to use this approach for cloud places using the Open Cloud API but this would add to loading times and require an API key. There is also risk of the Instance being saved to the place, causing Rojo to connect the next time the Rojo plugin starts.
- Adding a local plugin to connect to the server through Rojo’s headless API: This strategy can lead to unintended connections if another place file is already open or if the plugin fails to be deleted.
To address these challenges, I suggest implementing CLI flags for Studio that can be read by plugins, such as:
RobloxStudioBeta.exe --user ROJO_OPEN_IP=localhost --user ROJO_OPEN_PORT=34872
```lua
local flags = plugin:GetUserFlags()
print(flags)
-- {
-- ROJO_OPEN_IP = "localhost",
-- ROJO_OPEN_PORT = "34872",
-- }
If Roblox is able to address this issue, it would enhance the development experience for myself and many others who rely on such tools. This feature could streamline workflows significantly. Consider the current multi-step process:
rojo build -o place.rbxl
start place.rbxl
rojo serve
- Open Rojo plugin in Studio.
- Click Connect button.
This could be simplified to a single command:
rojo open -o place.rbxl