Script reverting to earlier versions

Since I’m unable to post studio bug reports, I decided I’d post this here.

I had a script with over 500 lines of code which took a few hours to make since it was about many different parts of the game such as replicating GUI to the client, loading the character via :LoadCharacter(), a door handler which took a lot of time to script, and I can go on and on.

When I went on my PC after waking up and going into studio, I got a message about some sort of “scriptlock failure” but I just pressed X and didn’t care. However, later, I checked the script (GameController) which had reverted to an earlier version for no reason… Can someone help please? I don’t want to have to rewrite 400+ lines of code.

Check your autosaves folder. Were you working in Team Create by any chance?

I was working in team create and I already tried looking in the autosaves folder, however, the version I had 500+ lines of code in that script is nowhere to be seen in that folder.

Forgot to mention, I applied edits to the script and published the game.

Maybe try downloading an earlier copy of your place through its Version History? (it’s under “Configure Place”)

This worked! But why did this happen…? This should probably be fixed soon to prevent more bugs like this happening.

Usually a consequence of forgetting to commit your scripts in Team Create. There’s also “Script History”, which you can view by right-clicking the script in explorer and navigating to the button.