i think the solution will be using datastore2, you have make a table with the eggs names and make them a boolValue , i did something like this with souls http://prntscr.com/onzf14 , and then you make a function, when player touch/get an egg it will make “the egg name” = true, and if it true then it show on your inventory
this video helped me to make datastore2
before you use the datastore you have to get this free model
This is a possible solution, but it seems like that method saves a lot of unnecessary data (all of the items are saved/loaded even if unowned) unless datastore2 does something behind the scenes that I don’t know about.
I think a more efficient solution is to save the inventory as a table of strings, that way you only actually save items that the player owns. (It also means you don’t have to manually add boolean table entries in the script)
it doesn’t matter… how you want to players to get the egg? if it’s by pressing a button then you can do instead of touched function do buttonpressed function
I ran into this issue while developing one of my projects. I corrected it by storing it as a table(lists work too) on the server. This is where a generic handler comes into play. Each interval or each time the player dies, I have a remote event that pushes the server to reload my inventory or make changes if needed. In my sole opinion, datastores are very sensitive to everything. They’re like the DISH network of tv providers. Sometimes they work flawlessly, and other times a minor(non-threatening) issue arises.
Thats what am asking how would i do that i now how to add a table i cant save it correctly thats all im asking how do i save it if i were savinga ui or something.
local saveTable = {}
local player = game.Players.LocalPlayer
for _,item in next, player.Backpack:GetChildren() do
table.insert(saveTable, item.Name)
end
Then you would save that table. When loading it, you would loop through the table and clone the item based on the name of the index.
You can clone UI’s. I usually clone like buttons for example. I would not recommend cloning a players UI, instead save the stuff in the players UI and then clone stuff based on the names and properties.
You know what lol imma save there ui just to keep it simple instead of saving the items name but do you know anyway i would do that from your perspective cuz im planning to use my method datastore3 where instead of saving the item by its name ill just save the host ui data so basically my method is to save the main object or whatever im trying to save