[Early Preview] Studio Script Sync

Yes… having the Studio script editor open on the 2nd monitor is nice … until you do a test and it resets back into Studio on monitor #1 - Annoying indeed. :frowning:

1 Like

have you taken a look at luau-lsp? it has auto-completion options for things like do-end blocks.

Pretty neat feature but why would somebody want to use a third-party editor rather than Roblox’s provided script editor?

Quick update regarding Script Sync:

We have moved the Sync context-menu actions to a more suitable place.

You will see them in their own dedicated section, below “View Script Changes” and above “Save to File”

Happy Coding!

3 Likes

Are there plans to make it possible to sync Scripts/ModuleScripts that are packages? Presumably after enabling editing on the script itself.

I noticed it was impossible to do currently while testing out the sync.

Scripts inside packages can be synced currently but not scripts that are themselves the root Instance of a package. We plan to resolve this!

2 Likes

Will we ever get more than just script syncing? Like for example, having the Roblox studio place in a folder with information such as object information, scripts, and other information to allow Source control like Github to work besides just replicating the Roblox Synced scripts into a folder.

1 Like

I spoke about this a little above

The answer is, it’s not something we’re working on at the moment. We are thinking about the other content types that could benefit from syncing though.

3 Likes

Hi, I been using this feature for 2 months now. Honestly it feels great, being able to use great tools inside VSCode for developing my game almost seamlessly, I would like to give ideas on some quality life improvements this feature could have:

  • Remember the last path location of the script file.
  • Not overwritting the file when you re-sync the script from an existing file.
  • Make suport for the Next Gen Explorer.

This feature for some reason made coding for me very enjoyable, it’s just those 3 things that could smooth things up a ton even if they are just small.


Potential bug

If you sync the script from Roblox Studio and it has characters like (ó, í, ñ …) the moment it overwrittes the file from resync, those characters become <?> inside VSCode. Like the 2nd picture here:
[Early Preview] Studio Script Sync - #102 by sanosuke298

Thank you for trying it out and giving us your feedback!

Good news, we’re actively working on this! The idea is when you restart Studio, everything resumes syncing.

Our plan here is to ask you if you want to use the file’s contents, or overwrite it when you start syncing. We have a quick mock up for this in the original post under ‘Starting sync from the state on disk, rather than the state in Studio’

Yeah, we’re sorry about this! This one slipped through the cracks. We’ll be fixing this in January but until then you’ll have to disable the Next Gen Explorer to use Script Sync.

2 Likes

Unfortunately, that is a known bug. We have a fix for this, but we didn’t finish it in time for the code freeze. This one will go out in Jan.

2 Likes

I love this, this was one of the main things that was tickling me a little but is good to hear it is being worked.

That’s perfect, I really appreciate the answers. I hope you and the team happy holidays. :heart:

1 Like

Wondering how Script Sync will handle my situation:

I really like and am comfortable with using the Studio text editor. It has improved a lot and now I have no complaints. (And that’s coming from someone who using the paid version of Sublime Text for everyone other than Roblox dev).

What I really want is to be able to use git with scripts created in Studio. Currently I use rbxlx files which are a bit unwieldy, but do work with version control. My team is not a good fit for Rojo, and currently Team Create forces use of binary rbxl files (the option to use rbxlx exists but it just gives you a binary file anyway with Team Create only).

Basically I want a Team Create compatible option that allows me to use git locally for scripts with a nice 100% Studio workflow. At least I think that’s what I want - you tell me!

Edit: when I say 100% Studio workflow just to be clear, I mean everything except local git. Not asking for a Studio git integration. I always prefer git standalone compared to IDE integrations. But the scripting features within Studio are now too good and timesaving (particularly having gotten very comfortable with typed Luau) for me to consider using an external editor for Roblox.

Don’t know if someone’s asked this already, but how would scripts inside scripts sync?
In Studio, I usually put ModuleScripts that will only be used in a script inside of the script, not in another folder. But you can’t put a file inside a file - only a file inside a folder.
I was originally thinking something like every script being its own folder, and it just has a file called “script.luau” in each one. But that’d get confusing very fast.

1 Like

Maybe I am misunderstanding something but why would git not work?

Happy new year :slight_smile: Great question!

Mechanically, all you need to use git for code with an otherwise 100% Studio workflow is an ability to move files bidirectionally between the file system and Roblox Studio. Bi-directionality here is important because to check changes into git, you need changes to move from Studio to disk. And to pull new changes, you need changes to move from disk to Studio.

Studio Script Sync supports syncing in both directions, but currently sync can only be started from the Studio state. That means when you hit ‘Start Sync’, it will overwrite the file on disk with the state in Studio. Additionally, we don’t support syncing folders yet so when a new script was created in a commit you would need to manually create it in Studio before you could sync it. As you can see in the original post, we have plans to address both of these limitations.

However, it sounds like what you are really looking for is a one click ‘commit my script changes to git’ button in Studio. Technically, this could be built as a Studio plugin without involving Script Sync. I wonder if anyone has tried this…

2 Likes

The jury is still deliberating on this one.

Rojo adopts the ‘init.luau’ pattern but there’s some ongoing debate with the Luau language about what ‘pattern’ the language should support.

If you ever wanted to load new changes from git, and you weren’t already syncing, the ability to hit ‘start sync’ and start from the state on disk rather than overwriting the state on disk would save you some manual steps.

One thing that would be usefull, would be a way to export all the scripts (modulescripts, localscript, script) from a project to your disk, while keeping all the folder structures intact. This is so I can more easily upload my scripts to git, so that I can have proper version control.

image

Maybe there should be an export button in the (FILE) menu in advanced where you can export all scripts from the project.

1 Like

I like the idea, but I would also like more than just scripts. We might need to require basic text files and the existing workarounds are fiddly. Being able to load text documents as assets, such as json files, would be very useful. I’d also like some kind of one way sync from VS to studio, with some way of calling the play button via external request. It would be handy for stuff like roblox-ts to write, compile, and execute in a single button.

1 Like