I have tried every way possible manually saving it and automatically saving it doesn't work even with a key. But now I wanna automatically save the characters position upon leave any help?
game.Players.PlayerAdded:connect(function(player) local Data=game:GetService("DataStoreService"):GetDataStore("Load") local SaveGui=player:FindFirstChild("ScreenGui"):FindFirstChild("Load") SaveGui.MouseButton1Down:connect(function() function clicked() if player.DataReady==true then Data:GetAsync(player.userId,player.Character:WaitForChild("Torso").Position.Vector3.x,player.Character:WaitForChild("Torso").Position.Vector3.y,player.Character:WaitForChild("Torso").Position.Vector3.z) end end end)
local Data=game:GetService("DataStoreService"):GetDataStore("Load") game.Players.PlayerAdded:connect(function(plr) local pos = Data:GetAsync(plr.userId) if pos then plr.Character:MoveTo(Vector3.new(pos.x, pos.y, pos.z) end end) game.Player.PlayerRemoving:connect(function(plr) local v3 = plr.Character.Torso.Position Data:SetAsync(plr.userId, {x = v3.x, y = v3.y, z = v3.z}) end)
It's just the general idea, some parts might give errors.