local ds = game:GetService("DataStoreService")
local ds1 = ds:GetDataStore("PostionSavingSystem")
game.Players.PlayerAdded:Connect(function(players)
local val = Instance.new("Vector3Value", players)
val.Name = "Position"
local userdata
pcall(function()
userdata = ds1:GetAsync(player.UserId)
end)
if userdata then
game.Workspace:WaitForChild(player.Name):WaitForChild("HumanoidRootPart").CFrame = CFrame.new(userdata.x, userdata.y, userdata.z)
else
ds1:SetAsync(player.UserId,{
x = 0,
y = 3,
z = 0,
})
end
end)
game.Players.PlayerRemoving:Connect(function(player)
ds1:SetAysnc(player.UserId, {
x = player.Position.Value.X,
y = player.Position.Value.Y,
z = player.Position.Value.Z,
})
end)
the game is saying underlining only player, its also saying SetAysnc is not a valid member of GlobalDataStore but it is???

1 comment
GlobalDataStore:SetAsync(); Not GlobalDataStore:SetAysnc() improper spelling. Its depreciated