I am trying to make a datastore system to save the player’s position when they touch a check point, but roblox does not allow saving vector3 values to datastore, I have no idea whow i could save it
local DataStoreService = game:GetService("DataStoreService")
local SpawnStore = DataStoreService:GetDataStore("SpawnPosition")
game.Players.PlayerAdded:Connect(function(Player)
local success , err = pcall(function()
return SpawnStore[Player.UserId]
end)
if success then
Player.CharacterAdded:Wait()
Player.Character:SetPrimaryPartCFrame(CFrame.new(success))
else
warn(err)
SpawnStore:SetAsync(Player.UserId , Vector3.new(-12, 4.6, 16))
Player.Character:SetPrimaryPartCFrame(CFrame.new(SpawnStore[Player.UserId]))
end
end)