So what I’m trying to achieve here is saving data of vehicles body color,wheels,eg…
I have tried putting it all in a values but I just can’t to seem to find out how to do it.
Create a table, and store each part of the data in a value inside it, then save the data, something like this.
local vehicleData = {
bodyColor = Color3.fromRGB(200,15,35),
wheelType = 4,
spoilerType = 0,
}
-- Save vehicleData however you are currently saving things
-- I'd suggest JSONEncoding the table
Ok, but how would I save the data for more than one vehicle?
local vehicleData = {
car1 = {
bodyColor = Color3.fromRGB(200,15,35),
wheelType = 4,
spoilerType = 0,
},
car2 = {
bodyColor = Color3.fromRGB(200,15,35),
wheelType = 4,
spoilerType = 0,
}
}
Ah ok, so after a player customizes a car I would add it to the table with the Vehicle data?
Yes, create a table for each car, and insert it into their vehicleData.