DataStore refusing to load data?
I have tried numerous ways to get it to work, unsure if it is a bug or not but can someone help me please The error I keep receiving is 19:29:22.015 - 502: API Services rejected request with error: HTTP 0 (HTTP 403 (HTTP/1.1 403 Forbidden))
Here is the script if you want to have a look at it.
01 | local data = game:GetService( "DataStoreService" ) |
02 | local datastore = data:GetDataStore( "RebornDataInitialiser" ) |
04 | game.Players.PlayerAdded:Connect( function (player) |
05 | local userid = tostring (player.userId) |
06 | local data 1 = Instance.new( "Folder" ) |
09 | local xp = Instance.new( "IntValue" ) |
13 | local level = Instance.new( "IntValue" ) |
17 | local saving = datastore:GetAsync(userid) |
20 | level.Value = saving [ 1 ] |
23 | local plr_data = { level.Value, xp.Value } |
24 | datastore:SetAsync(userid, plr_data) |
26 | game.Players.PlayerRemoving:Connect( function (player) |
27 | local id = tostring (player.userId) |
28 | local plr_data 2 = { player.Data.Level.Value, player.Data.XP.Value } |
29 | datastore:SetAsync(id, plr_data 2 ) |