Script:
function onPlayerRemove(player) --//Variables\\-- local Key = "%^&$#" ..player.UserId local SpaceCoins = player.leaderstats.SpaceCoins local EvoTokens = player.OtherData.EvoTokens local Evolutions = player.OtherData.Evolutions local Equipped = player.Equipped local Pets = player.Pets local PetTable = {} for i,v in pairs(Pets:GetChildren()) do table.insert(PetTable, v.Value) end local DataTable = { SpaceCoins.Value, EvoTokens.Value, Evolutions.Value, PetTable, Equipped.Value } --//Save Player Data\\-- PlayerData:SetAsync(Key, DataTable) print("Data Saved For " ..player.Name) end game.Players.PlayerRemoving:Connect(onPlayerRemove)
Error:
20:13:15.097 - 502: API Services rejected request with error. HTTP 0 (HTTP 403)
Give studio access to datastore services by doing the following:
1: Access the game settings in studio 2: Enable the checkbox "Allow studio to access API services"
This should fix your issue. If it doesent, please comment here and I will continue to help.