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

Is it possible to save player gui?

Asked by 6 years ago

Hello, i'm creating a simulator game and i'm wondering if it is possible to save player gui ? Especially one of them, which is important. Of course players can unlock stuff from this gui again, but i would like to save it and load with unlocked stuff.

1 answer

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

If you're asking if its possible to save GUIs when someone resets, the answer is yes. There is a property named ResetOnSpawn that does just that. To enable it, select the GUI you would like to save, and then change the ResetOnSpawn property to true.

If you're asking if its possible to save GUIs when someone rejoins, the answer is no. To achieve something like this, you should save data instead of saving the GUI itself. You can save data using Roblox's DataStore service, which allows you to save strings, ints, numbers, and other various data types such as a table. For this particular example, you can save the data in a table and then load it again. From there, send the data to the player and have the player GUI handle unlocking things.

That may sound confusing, so here's some other wiki articles that could help get you going. If you have any other questions, feel free to contact me on discord joritochip#4657.

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

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

http://wiki.roblox.com/index.php?title=API:Class/ScreenGui/ResetOnSpawn

If I helped you out, please leave an upvote! If I solved your solution, please mark my reply as the post's solution. This allows future visitors to see the correct solution. Thanks!

0
Yep, it's a bit confusing, but understand what do you mean. Anyway thank you for answer :) karolus1 8 — 6y
0
But it is possible to save the numbervalue inside the playergui? Minecrafter09031031 16 — 4y
Ad

Answer this question