So I'm trying to make a way for someone to paint a map, then save what they've painted. I've tried to save the position of each part and its color, but I get a "cannot store array in datastore" error, and from what I've looked up I'm guessing that's because I'm trying to save too much data, so does anyone know a different way I could achieve this, or if there's something else I'm doing wrong??
What I tried:
mapSaves=DataStore:GetDataStore("mapSaves")
game.Players.PlayerAdded:connect(function(player)
player.Chatted:connect(function(chat)
if chat == "smap" then
local saveTable={Potato=4}
for i,v in pairs (workspace.worldMap:GetDescendants()) do
if v:IsA("Part") or v:IsA("UnionOperation") then
table.insert(saveTable,v.BrickColor)
end
end
for i,v in pairs (saveTable) do
print(i.."="..tostring(v))
end
mapSaves:SetAsync(player.UserId,saveTable)
end
end)
end)

3 comments
Thanks, that solved the issue I was having :D
This is not the proper way to solve this problem.
There are other methods that are more supported and better to handle.