Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Autosave droppers in tycoon?

Posted again because nobody answered in 7 hours. I am building a very long tycoon where you build a store chain with over 10 locations. Saving has become an issue because players spend hours playing the game and want to continue where they left off next time they play but they can't. I tried this script: game.Players.PlayerRemoving:connect(function(p) if p:findFirstChild("leaderstats") then p:SaveInstance("SavedStatPNum"..tostring(game.PlaceId),p.leaderstats) end end) game.Players.PlayerAdded:connect(function(p) for k = 1, 60, 0.03 do wait() if p:findFirstChild("leaderstats") and p.DataReady then break end end local Loaded = nil if p:findFirstChild("leaderstats") and pcall(function() Loaded = p:LoadInstance("SavedStatPNum"..tostring(game.PlaceId)) end) then for j, v in pairs(Loaded:GetChildren()) do pcall(function() p.leaderstats[v.Name].Value = v.Value end) end end end) but it only saves the leaderstats, not the droppers like I want it to. Any suggestions?

4 comments

0

use datastore data persistence is depreacted

0

that does not help with saving the droppers

0

Make a datastore for values and have them update when the player makes a purchase such as a boolean

0

Use a code block please.

1 answer

✓ Accepted answer

First of all, I would like to say actually try to make it save. I can tell you didn't make that script, and it is a free model. "I tried this script". If you really tried, you would be able to see that it saves leaderstats. Non attempt. Heres what you do: Create a value for every single item purchaseable, and save that in a datastore, and use that to load and save data. Oh and by the way, you will actually need to learn to script for that. Tycoon kits don't accommodate for that.

1 comment

0

I'll try it, but being mean doesn't help anyone

This discussion is preserved as it was. New answers, comments, and votes are closed.