Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I save a GUI's progress?

Asked by 7 years ago

Since most of my games are UI based and progress happens on the game such as saving a intvalue within the UI. But the solutions I have tried have all not worked. I've tried using SaveInstance to save the actual screengui

game.Players.PlayerAdded:connect(function(Player)
    Player:WaitForDataReady() 
    Player:SaveInstance("Screengui", game.Startergui.GuiName)
end)

but that was unsuccessful.And most of the other ideas I think of to get around the issue I can't put into scripting terms.Let me guys know what you think on this situation, your help is much appreciated.

0
Use Datastore bossay8 8 — 7y

1 answer

Log in to vote
0
Answered by 7 years ago
Edited 7 years ago

I don't think you can save a GUI with the Datastore service. What you're going to need to do is use all of the correspondents of the GUI that are Values, save those values w/ a key, and then make the GUI check for the last time data was saved. The datastore script must be a serverscript.

Here's an example:

You have 3 values, EXP, Level, and TimePlayed. The values need to be saved in a datastore, so when the player joins back the GUI can retrieve the data when the player last left, and they'll be back where they were. You have to check the player for what stats they have everytime they join, or else you'll be getting tons of restarts from people.

For extra info, see this

http://wiki.roblox.com/index.php?title=Data_store

(Not the best wording)

0
How about those lazy people? cherrythetree 130 — 5y
Ad

Answer this question