Out of nowhere, Studio began freezing for 20-30 seconds every time I press stop.
This started about two or three hours ago as of me posting this. I started disabling everything until I got the issue to stop, eventually I found the cause. This code inside a script in ServerScriptService:
local DataStoreService = game:GetService("DataStoreService") local experienceStore = DataStoreService:GetDataStore("TestData")
I commented it's surrounding code that uses the data and found it is only those two lines causing my problem. I had this code here for a little over two weeks, and never touched the script before it started freezing studio.
For a bonus test, I loaded an older game I haven't touched in a while that also used DataStore Service, and encountered the same issue. I really am at a loss as to what's happening. Could a ROBLOX update have been the culprit?
I replicated the problem in four steps:
1:Creating a new game,
2: Add a Script to ServerScriptService with only the above lines,
3: Playing as a character,
4: Stopping the game.
The game freezes for an annoying amount of time, and then starts acting normally.
I've attempted restarting Studio, and even restarting my computer and the problem continued to persist.
Edit: I've pinpointed the issue again to only this line alone:
local DataStoreService = game:GetService("DataStoreService")