Importing Instances from Roblox Studio to Visual Studio Code using Rojo automatically

I have created a Roblox game that’s parented to my Roblox group and I have been using Visual Studio Code (with the Rojo extension) as my main code editor instead of using Roblox’s built-in script editor.

  1. What do you want to achieve?
  • How can I import my Roblox instances (ScreenGui, Part, BoolValue, UICorner, RemoteEvent, etc.) from Roblox Studio to Visual Studio Code using Rojo automatically without manually writing files one by one?
  1. What is the issue?
  • I recently tried using Rojo and it turned out pretty well until I stumbled upon an issue. I needed to import the Instances from Roblox Studio to Visual Studio Code automatically. I found out that you needed to create a "Instance Name".model.json or "Instance Name".meta.json file. The issue here is I had to create the file instance by instance and write the ClassName, Properties, Children, etc. manually in bunch of different files.
  • One time, I imported some Instances/Scripts manually and because it does not import the Instances to Roblox Studio automatically, I pressed the “Accept” button on the syncing page on Roblox Studio, I lost every instance that wasn’t in the VS Code project I was working for the game. Fortunately, I was able to revert this back soon after. But still, how can I import the instances automatically?
  1. What solutions have you tried so far?
  • I’ve searched through a ton of forums and barely found anything mentioning about this. I also searched through YouTube to help me with this problem, and the results I found used the rbxlx-to-rojo tool. Since I already published my game and it’s also a game parented to a group, the “Save to File” option wasn’t there.

Note that I also read the Github repository of Rojo specifying that in the future it can sync instances. I wonder how other games I saw on the Homepage of Rojo such as Tower Defence Simulator, Adopt Me, Jailbreak, etc. does that.

Appreciate every person that helps me with this issue!

Rojo can also sync Roblox model files (rbxm binary and rbxmx XML spec, latter preferred) so if you save these instances to your working environment then Rojo will sync them.

1 Like

How do I do that exactly? Do I just save the instance as a .rbxm file and import it in the folders and run a specific command? Also do I have to import them manually too?

Yeah, you save instances as rbxm(x) files to your working directory where the rest of your code is. No extra work is needed from you; no commands need to be run or anything.

The working directory refers to whatever directory you have open while working on the code in Visual Studio Code. You just need to save it there.

Here’s an example from my own project:

image

That actually worked, thank you so much!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.