How to check if a DataStore name exists (without creating it)?

I get access to a specific DS I use GetDataStore.
But, as stated on the documentation:

“This function creates a DataStore instance with the provided name and scope”

I need only to TEST if a specific DS exists, without creating a new empty one.
How can I do that?

1 Like

:GetDataStore() returns a DataStore instance. Where an instance is a game object. That instance simply caches the data from GetDataStore. It should automatically be deleted if the server shuts down or there are no variables referencing it. It is not actually creating a data store, it is just creating an object to hold information on that datastore. I would assume that the datastore would only be created by :SetAsync(). The data would be nil if the datastore does not exist.

1 Like

Have you tested before to be sure?

Sorry, I’m late!
I don’t think that there is a real way to test it. Sadly. Even if it does create it, don’t mind it. But in reality it should, since Roblox and Roblox Studio are really optimized applications, and if it didn’t delete empty DataStores, that would be weird, and it would take up space in their servers. So just use the “:GetDataStore()” without worrying!