I've been using a work around to "You can't save Vector3's to DataStore," by saving each axis, However the results are...Not pretty.
Instead of the X, Y, and Z Coords, I get 1.2714055432228943e-023,2.9659440517425537,-1.6159910306761053e-023. Which makes sense, there are 3 of them, just...Very wrong coordinates!
When Saving
local pos = Instance.new("Vector3Value") pos.Value = Player.Character.Torso.Position local savePoint = {Player.leaderstats.Money.Value, Player.leaderstats.Allegiance.Value, Player.leaderstats.Level.Value, Player.Class.Value, pos.Value.X, pos.Value.Y, pos.Value.Z} local saveString = Utils:JSONEncode(savePoint) save:SetAsync("sav_" .. Player.Name, saveString)
and then it loads it, Decodes it from JSON to table, and Moves the player based on the last 3 Values.
To be blunt, It doesn't do that...
You could just make a datastore with the values separate, with no JSON stuff needed...
local Vector3Store = game:GetService("DataStoreService"):GetDataStore("Vector3Store") --Or whatever it is, I can't remember this late at night Vector3Store:SetAsync("X", n) Vector3Store:SetAsync("Y", n2) Vector3Store:SetAsync("Z", n3)
Then, you call this entire thing up as a table, no JSON needed, and voila.