DataStore Error "Only UFT-8 " when I use UTF-8 characters

Hello. I’m writing datastore for a plot game where I need to save owned slots and PlotData but the template I write looks like it’s not only UTF-8 but I don’t know why.

The Code:

local ProfileTemplate = {
	LastSeen = 0,
	Cash = 0,
	Cars = {},
	PlotConfig = {
		OwnedSlots = {"Plot2", "Plot3"},
		PlotData = {}
	},
	LastPos = Vector3.new(0,0,0)
}

Thanks for any help

1 Like

You can’t store a Vector3 value inside DataStores. Instead you’ll need to store the 3 number values which make up the Vector3 value, in the example provided that would be (0, 0, 0).

local ProfileTemplate = {
	LastSeen = 0,
	Cash = 0,
	Cars = {},
	PlotConfig = {
		OwnedSlots = {"Plot2", "Plot3"},
		PlotData = {}
	},
	LastPos = {0, 0, 0}
}

When you load the data you can index this array to recreate the Vector3 value stored from its components.

local vectorFromDataStore = Vector3.new(lastPos[1], lastPos[2], lastPos[3])
1 Like