As a Roblox developer, it is currently impossible to use ChangeHistoryService to save script changes
Right now whenever I make a change with a script I have to reopen studio because I cannot undo the change
This is pretty annoying especially since studio has been opening up ultra slowly in the recent 3 months
I don’t want ChangeHistoryService to manage script changes. Changes to the game world and changes to code should be kept separate because they’re different working environments. The expected behavior is for undo to undo some change made in your immediate environment.
Instead, there should be some separate system for managing history per script.
I don’t think Roblox should insert automatic waypoints into the ChangeHistoryService list, I think whatever they do now is perfect for that
But if we use SetWaypoint explicitly, I think it is desired (at least I desire) to insert a waypoint into the ChangeHistoryService list, so that I can easily undo/redo
What would you do instead though? A separate shortcut to undo in scripts? What I use it for is, not to make changes to just one script, but hundreds, so the solution would need to be easily scalable to more than one script
Plugins can save changes with ChangeHistoryService. It’s up to the developer to implement this properly. Some plugins do like the derivatives of CmdUtl, while others don’t. If plugins you use are in the latter category, that’s a plugin problem and not a Roblox one. Tell the plugin creator to fix their plugin, or locally modify the plugin yourself.
The command bar can use ChangeHistoryService as well. Insert a part into Workspace and then run:
This is difficult to fix, we can’t simply turn on the ChangeHistoryService for the .Source property, which is why it has gone unfixed for so long.
What the .Source property returns changes every single time you type a character in a script, but the ChangeHistoryService can’t afford to record all the contents of a large script x however many characters you type in it during a session. The script editor doesn’t have this problem because it has smarter text-editing specific undo handling.
If you want a workaround for script changes which happen all at once, you can delete the old script, and create a new script with the modified source rather than editing the existing script’s source. That way the changes will be picked up (Note: You will have to set the .Source property before you parent the new script to the hierarchy for this to work).