[Early Preview] Studio Script Sync

Awesome!

(More words to satisfy the system: Of course doing a full git-like system would be difficult. Any improvement is appreciated.)

1 Like

There is currently a workflow-breaking issue when editing auto-saved files in VSC with multiple cursors.

How to recreate (possibly):

  1. Close the editing tab of a script in studio
  2. Sync the file to disk
  3. Open the file in VSC (i don’t know if this issue also occurs on other editors) and make sure the program is set to auto-save files on a time interval (mine is set to once every second)
  4. Edit the file with multiple cursors (10-20 simultaneously)

This errors should occur randomly when trying to write something to the file. Thing is, i remember editing a couple of lines without reopening the editing script tab in studio, and when i reopened the file again this morning i discovered that the edits I’ve done were not saved.

Apparently if i keep the script editor tab opened in studio this issue doesn’t seem to happen.

This looks bad! Good catch, we’re investigating now. We’ll keep you posted.

2 Likes

Thanks for this report!

We think that the issue is due to your “End of Line Sequence” setting being set to CRLF. Currently, we only support LF. Changing this setting should fix the issue for you. Please let us know if the issue persists.

We will work on addressing this.

I’d really like to start using VSCode for scripting so that I can have my code editor in a persistent window on my second monitor, but am really missing some Roblox-specific things like the automatic do-end block creation when you hit Enter. Any external tool pros here who have some tips to make it more like the Studio editor, or at least how I can get started on doing it myself?

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?