Warn("Data could not save for ".player. Sessiondata.Rebirths = Rebirths.Valueĭatabase:SetAsync(player.UserId, sessiondata) Player:Kick("Unable to load data, Try again")Ĭlicks.Value = sessiondata.Clicks Warn("Unable to get data for ".player.UserId) Local Rebirths = Instance.new("NumberValue") Local Clicks = Instance.new("NumberValue") If you want to get backups, the Gotchas page can help you out. Local leaderstats = Instance.new("Folder") DataStore+ will handle data similarly to DataStore2, with DataStore+ however, it will save data also on the datastore and key you requested. Local database = DataStoreService:GetDataStore("data") Local DataStoreService = game:GetService("DataStoreService") local RunService = game:GetService("RunService") I haven’t tested if it works in game, but in studio it doesn’t work, so i’m just wondering what could be wrong with it if theres no errors. You should make a datastore for your items where you store the purchased items. :Connect(function(player)ĭatastore:SetAsync(player.So I’m trying to make a datastore for my clicker game, and it won’t work, I don’t really know why, there’s no errors or anything, it just doesn’t save. If tableOfData then - we know that it is a returning player whom already played this game beforeĮlse - we know that this player is new or their data got throttled (cached) or whatever you call it and have lost their data Many games use default DataStore, prefer it and have no problem with it (I. Data losses happen from time to time, but you can counter it with carefully written scripts to some extent. TableOfData = datastore:GetAsync(player.UserId) DataStore2 is very good, and I like to use it, tends to help you and make your life easier, but DataStore by itself is great as well. Local success, errormessage = pcall(function() Local datastore = datastoreservice:GetDataStore("PlayerDatastore") Got it done local datastoreservice = game:GetService("DataStoreService")
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |