Datastore2 lag in studio

I’m using the Datastore2 module and every time I test in studio and then stop testing, there is a big freeze up during shutdown. It seems like the module is trying to save, but I’m not really sure if that’s the case.

Any way to stop attempting to save while in Studio for Datastore2?

Thanks in advance.

1 Like

I fixed it.

The issue was BindToClose() causes the delay, so I added a check using game:GetService(‘RunService’):IsStudio() and that solved it.

2 Likes

By default, DataStore2 shouldn’t save in studio (you’ll get a warning in output if you’ve enabled it).