I’m trying to save a Dictionary to a Datastore. There is a Script which handles the Data when the player first starts. What it does is, if the Player’s Place1 is nil (meaning that’s the first time they’ve joined), their Place1 will be set to a dictionary containing information that can be used to load their place and play it. Here is the code in the Script:
local StartingMapFormat = {
Object1 = {
ClassName = "Part",
Name = "Baseplate",
Size = Vector3.new(100, 1, 100),
Position = Vector3.new(0, -0.5, 0),
BrickColor = BrickColor.new("Medium stone grey"),
Material = Enum.Material.Plastic,
Anchored = true,
}
}
game.Players.PlayerAdded:Connect(function(Player)
if DSS:GetAsync("Place1~"..Player.UserId) == nil then
DSS:SetAsync("Place1~"..Player.UserId, StartingMapFormat)
end
end)
When I run this code, the error
104: Cannot store Dictionary in data store. Data stores can only accept valid UTF-8 characters.
appers.
I was wondering if there are any alternatives to saving a dictionary, or just simply why it says DataStores only accept valid UTF-8 Characters.
I’ve tried reading into UTF-8 and it made no sense whatsoever. Any help would be great, thanks!