The question is quite self explanatory… How can I make a system whereas it checks if the player owns certain cars. This is to make up a list of owned cars that can be accessed at anytime as it’s saved on a datastore. IDK how i can make this possible, so i would love to know how.
Should i be using a table and save it… or should i be making it another seperate datastore to serve as a list for each player.
With that now in the car shop whenever you create a car’s gui frame just check if the car is in OwnedCars, if it is then ok its owned, if its not then put it up for sale
EDIT: Instead of using string values you could use more tables that could have configuration settings for car customizability
Im thinking of making it a folder of string values (String value being the name of the cars) then when the player leaves (Since this is a 1-player main menu place) it will saves all the string into a datastore table. The game will check if the player has the name of the cars within the owned player list and then the car will load into to the game.
that is a good idea but it would be much easier to just put all car clones in a folder and then generate based on that folder (also you don’t really need to make it a folder you can change the datastores directly)
What I’d do is have a folder of vehicles (placed in server storage) and a folder of “BoolValue” instances placed inside the player instance. With the name of each “BoolValue” instance corresponding to a vehicle’s name, a value of true indicating that the vehicle is owned by the particular player and similarly a value of false indicating that the vehicle is not owned by the particular player. Then all you’d need to do is save/load the values of these BoolValue instances each time the player leaves/joins respectively.