I have an egg hunt system and there’s just one problem, the collected eggs reset back to 0 after rejoin/death/killed, and I need help to make them save.
I haven’t tried writing any scripts out for it my self because I’m not a scripter, sorry.
Then you are not watching the full tutorial, that is a great tutorial provided by @GnomeCode, which explains datastores in a very clear and understandable manner. We will not provide a full code for you if you do not wish to learn.
It just saves and loads whatever is in the leaderstats folder. It uses datastore2 behind the scenes, so it’s pretty reliable too.
The thing has an un-copy-locked egg hunt example with saving and stuff:
I bet you can use/modify the game above. It stores the names of all the eggs the player has in leaderstats under a folder and keeps and updates a count of all the eggs they’ve found.
I think to add more eggs you just need to Tag them, name them, or set an attribute (look at the existing eggs for the right format) and give them a unique name or attribute for saving. I think it also has some code you can edit to add badges.
When testing datastores, remember you need to publish your game and go into the game settings and enable the datastore service.
Looks great but the one im looking for is where it shows as a gui how many eggs you collected out of the actual amount you should collect and a reward for collecting all eggs like stats of a tool.
Dude this isn’t the toolbox or your free worker marketplace, you ask for help, we give you help, we don’t give you your entire game. Make a GUI, get the eggs from the database, and add it to the GUI.