- GitHub Integration for Roblox Studio with Rojo and Visual Studio Code Developer Documentation
This repository serves as a comprehensive guide and template for integrating Roblox Studio with GitHub using Rojo and Visual Studio Code. Streamline your collaboration and version control workflows, enabling efficient development and seamless integration between these powerful tools. Follow the provided documentation to set up a robust development environment, leverage Rojo's capabilities, and enhance your productivity in creating amazing Roblox experiences. Connect with the community and explore the possibilities of GitHub integration for your Roblox Studio projects.
Before using Rojo Visual Studio to Roblox Studio integration, ensure the following prerequisites are met:
- Device running on Windows 8 or later versions.
- Visual Studio Code is installed on your system.
- Roblox Studio is installed on your system.
It is recommended to use Aftman as your toolchain manager. A toolchain manager is a software utility that simplifies the installation and management of development toolchains, providing a centralized interface to handle the setup and configuration of necessary tools for software development.
- You can view aftman here: https://github.com/LPGhatguy/aftman
To automatically install Aftman, Rojo, and Wally on Windows, run the installer script from the installer If you use the auto installer, you can skip the manual installation process.
Follow these steps to install Aftman and set up the environment:
- Download and Install Aftman from the official repository or release page
After you have installed aftman, run the following commands:
aftman add --global rojo-rbx/rojo
aftman add --global UpliftGames/wally
aftman install
This will install rojo and wally globally.
Follow these steps to install the Rojo plugin in Roblox Studio:
- Open a PowerShell or command line prompt
- Run the following command:
rojo plugin install
To enhance your development experience with Rojo Visual Studio to Roblox Studio integration, it is recommended to install the following Visual Studio Code extensions. These extensions provide additional functionality and tools specific to Roblox development.
-
Highly Recommended: Selene (by Kampfkarren): Selene is a powerful linter for Roblox Lua scripts. This extension integrates Selene into Visual Studio Code, providing real-time linting, code analysis, and error detection as you write code. It helps you maintain code quality and adhere to Roblox Lua coding standards.
-
Highly Recommended: Roblox LSP (by Nightrains): Roblox LSP (Language Server Protocol) extension provides advanced language features for Roblox Lua scripting. It includes features like IntelliSense, diagnostics, and code navigation, enhancing your coding productivity and accuracy.
-
Highly Recommended: Roblox API Explorer (by evaera): This extension allows you to explore the Roblox API documentation directly within Visual Studio Code. It provides autocomplete suggestions, documentation tooltips, and quick access to Roblox API references.
-
Highly Recommended: Rojo Viewer (by Filip Tibell): Rojo Viewer extension provides a visual representation of your Rojo project's structure within Visual Studio Code. It helps you visualize the relationships between files, folders, and namespaces in your project, making it easier to navigate and understand the project's organization.
Installing these recommended extensions can greatly enhance your development workflow and productivity when working with Rojo Visual Studio to Roblox Studio integration.
Note: You can install these extensions directly from the Visual Studio Code marketplace by searching for their respective names and following the installation instructions provided by each extension.
To initialize a directory for Rojo integration, follow these steps:
- Open the terminal or command prompt.
- Navigate to the directory where you want to initialize your game.
- Run the following command:
This will initialize the directory with the specified name (in this case, the name is "my-new-game").
rojo init my-new-game
It is recommended to use Visual Studio Code Source Control with Github Desktop integrated.
Be sure to have a .gitignore
file which contains the following:
# Project place file
/build.rbxlx
# Roblox Studio lock files
/*.rbxlx.lock
/*.rbxl.lock
To build the place file using Rojo, follow these steps:
- Open the terminal or command prompt.
- Navigate to the directory where your game files are located.
- Run the following command:
This will generate the rbxlx file named "build.rbxlx" in the current directory.
rojo build -o build.rbxlx
Alternatively, a place file could be created via Roblox Studio.
To start the Rojo live server, follow these steps:
- Open the terminal or command prompt.
- Navigate to the directory where your game files are located.
- Run the following command:
This will start the Rojo live server
rojo serve
To connect to the live server from Roblox Studio, follow these steps:
- Open Roblox Studio.
- Open the build file created in the previous step (
build.rbxlx
). - In Roblox Studio, click on the "Rojo" tab.
- Click on the "Connect" button to connect to the live server.
- Now, any changes you make in Visual Studio Code will be automatically synced with Roblox Studio.
Note: It is recommended to exclusively edit scripts from Visual Studio Code when editing the build file to avoid potential data loss.
The Wally extension provides additional functionality for managing plugins and dependencies. Follow the steps below to use the Wally extension with Rojo.
To initialize Wally in your project directory, follow these steps:
- Open the terminal or command prompt.
- Navigate to your project directory.
- Run the following command:
wally init
To add project dependencies using Wally, follow these steps:
- Open the
wally.toml
file located in your project directory. - Add the project dependencies to the file in the following format:
Specify the required dependency along with its version.
[dependencies] roact = "roblox/[email protected]"
To install the project dependencies using Wally, follow these steps:
- Open the terminal or command prompt.
- Navigate to your project directory.
- Run the following command:
This will install the specified dependencies.
wally install
To add packages to the game using Wally, follow these steps:
- Open the default project JSON file in Visual Studio Code.
- Add the following code snippet to the JSON file:
This will add the packages to the build.
"ReplicatedFirst": { "Packages": { "$path": "Packages" } }
To use the linter with Rojo, follow these steps:
To set up Selene for linting in your project directory, follow these steps:
- Create a
selene.toml
file in your project directory. - Write the following content in the
selene.toml
file:This configures Selene to use the Roblox standard library.std = "roblox"
If you encounter any issues or errors while using Rojo Visual Studio to Roblox Studio integration, refer to the Rojo documentation or community forums for troubleshooting steps and solutions.
Q: Can I edit scripts directly in Roblox Studio while using Rojo? A: It is recommended to exclusively edit scripts from Visual Studio Code to avoid potential data loss. Editing scripts directly in Roblox Studio while using Rojo can lead to overwritten changes.
Q: How can I update the project dependencies with Wally?
A: Simply update the version numbers of the dependencies in the wally.toml
file and run wally install
to update the dependencies.
Q: What is Rojo - Roblox Studio Sync (by evaera) A: The Rojo extension provides seamless synchronization between Visual Studio Code and Roblox Studio. It replaces the need for many installation steps, however may not be an end all solution for all project requirements. That being said, it may be a good option for you: https://marketplace.visualstudio.com/items?itemName=evaera.vscode-rojo
If you need further support or want to engage with the community, you can visit the following resources:
- Rojo GitHub repository
- Rojo Discord server
- Wally GitHub repository
- Wally Discord server
- Roblox API Explorer GitHub repository
- Roblox LSP GitHub repository
- Rojo Viewer GitHub repository
- Selene GitHub repository
Feel free to reach out to the respective communities for any questions or assistance related to Rojo, Wally, the recommended extensions, or the integration between Visual Studio Code and Roblox Studio.