of     1   

wasi15191
#218137683Sunday, June 04, 2017 12:21 PM GMT

So i am making a tycoon game. I need help on how to make save/load button which loads the tycoon as it was because the tycoon is lengthy so plss help.
SinisterMemories
#218139373Sunday, June 04, 2017 1:04 PM GMT

this looks about what u need to achieve this wiki.roblox.com/index.php?title=API:Class/GuiButton/MouseButton1Click wiki.roblox.com/index.php?title=Data_store #code print("oh no an errorz!")
ur_famous
#218139663Sunday, June 04, 2017 1:14 PM GMT

When a player buys something you should make it to add a value to a table Then save that table as a Datastore. So like this: local DataStore = game:GetService("DataStoreService"):GetDataStore("TycoonSave") local Http############################################local saveT = {} function add(obj) -- Call this function when you buy something, obj is the object/model/button/as you choose table.insert(saveT, obj.Name) end function saveTycoon(Player) -- Call this function when you wish to save a tycoon. DataStore:SetAsync(Player.userId.."Tycoon", HttpService:JSONEncode(saveT)) end function loadTycoon(Player) -- Call this function when you wish to save a tycoon. saveT = HttpService:JSONDecode(DataStore:GetAsync(Player.userId.."Tycoon")) if saveT ~= nil then -- Now it can save and load, here it will have the table loaded with the names of the objects/models/buttons/as you choose, here you should do something to clone them ,that depends on your tycoon system. end end Signed, eiad999 - ur_famous ~ Holder of India ~ Holder of India of development ~ Founder of Legends Studios ~ Developer of Stormcage Containment Facility...
wasi15191
#218159893Sunday, June 04, 2017 6:40 PM GMT

i admit i am a noob ur famous plss tell me i didnt understand what you were trying to say
Julian_Orteil
#218160984Sunday, June 04, 2017 6:57 PM GMT

Basically, what he is doing is this: Saving the tycoon to a table and converts it to a JSON string and saves it to a datastore. Then, when a player enters (or something of the equivalent), the data store finds the player's stuff based on his userId and loads it. Sometimes, it's the people no one imagines anything of, who do the things that no one can imagine.

    of     1