Hello Everyone!
Today, I’ve really been focusing on trying to make DataStore for a wall.
For a tiny bit of a better understanding of this wall, when you purchase it, it is really just purchasing the next area in the game. Transparency becomes 1 and CanCollide becomes false.
What I am trying to do is save this purchase when a player leaves so they don’t have to re-buy the area, but I cant really find anything on how to do this. Also from what I have researched, DataStores are very confusing. Is there any way someone could give me a better understanding of how DataStores are made and work and how I can make one for this wall/area.
What I have done when needing to save data that isnt exactly values that get displayed on the leaderboard is I would save the name of something the player unlocked in a table. So say they unlock like a “Forest Area.” Then in your table add “Forest” and once they join the game have it iterate through the table, and if they have unlocked the Forest (they have a forest value in the table) just simply remove that wall for them.
There’s a lot of threads you can find on how to save data in tables so I am not going to get into all of that here, but just browse around and you’ll find the mother load.
So basically making a table with all of the walls/areas and then kinda having a value for them, once it is purchased that value will go up and it will somehow save it? I don’t know, I’ve spent all day trying to do this.
it is very confusing for me. lol
The player purchases the forest area. Then, in that table store the value “Forest” and save it. When the player rejoins, check if the value “Forest” is in the table, and if it is, remove the wall so they can go to the forest area without having to purchase it again. And with new areas, just keep adding the names of the areas to that table once they’re purchased