So I am making a game where players make their own suit & can eventually build plating on it. But I am having trouble coming up with a way to store the player's 'plating configuration' since each plate has to have a 'vector 3' sort of value as well as which part it is attached to & what material it is. how would I store these five different values easily in a table & then store it with datastore?
here is some code I was experimenting with but I am still having trouble:
local DSS = game:GetService("DataStoreService")
local PltngConfig = DSS:GetDataStore("PlatingConfig")
game.Players.PlayerAdded:connect(function(player)
if PltngConfig:GetAsync(player.userid) ~= nil then
PlatingConfig = PltngConfig:GetAsync(player.userid)
else
--code to make new data will go here
end
end)
game.Players.PlayerRemoving:connect(function(player)
PltngConfig:SetAsync(player.userid, PlatingConfig)
end)
