-
Open Studio
-
Open new Baseplate project
-
Create a ModuleScript inside ServerStorage
-
Copy this code into the ModuleScript
local CloseTask, DestroyTask, Unlock, Save
export type Constructor = {
new: (name: string, scope: string, key: string?) -> DataStore,
hidden: (name: string, scope: string, key: string?) -> DataStore,
find: (name: string, scope: string, key: string?) -> DataStore?,
Response: {Success: string, Saved: string, Locked: string, State: string, Error: string},
}
LockTask = function(runningTask, proxy)
local dataStore = getmetatable(proxy)
if dataStore.TaskManager:FindLast(CloseTask) == nil and dataStore.TaskManager:FindLast(DestroyTask) == nil then StartLockTimer(proxy) end
if dataStore.__public.SaveOnClose == true then Save(proxy, 3) end
dataStore.__public.StateChanged:Fire(false, proxy)
end
CloseTask = function(runningTask, proxy)
local dataStore = getmetatable(proxy)
if dataStore.__public.SaveOnClose == true then response, responseData = Save(proxy, 3) end
Unlock(dataStore, 3)
end
DestroyTask = function(runningTask, proxy)
local dataStore = getmetatable(proxy)
if dataStore.__public.State == false then
if dataStore.__public.SaveOnClose == true then response, responseData = Save(proxy, 3) end
Unlock(dataStore, 3)
end
dataStore.__public.StateChanged:Fire(nil, proxy)
end
return Constructor :: Constructor
-
Wait a few seconds
-
Change the 3 on line 26 to 4
-
Congratulations you have just crashed the type checking engine
-
to test if the type checking engine has crashed create a new script and type
game
you should notice that auto complete no longer work you must restart studio now to fix it
this problem was previously reported here: This module breaks type checking and crashes studio · Issue #1102 · luau-lang/luau · GitHub
it was fixed for a short time but then stopped working again
you can find the full module here: https://create.roblox.com/store/asset/11671168253
but iv narrowed the problem down to the code shown above