Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Are datastoreservice datastores broken?

Asked by 7 years ago

I have the following savedata script in serverscript service in one of my games:

01local AUTO_SAVE = false        
02local TIME_BETWEEN_SAVES = 60  
03local PRINT_OUTPUT = false     
04local SAFE_SAVE = false
05---------------------------------
06 
07local players = game:GetService("Players")
08local dataStoreService = game:GetService("DataStoreService")
09local leaderboardData = dataStoreService:GetDataStore("LeaderStats")
10 
11local function Print(message)
12    if PRINT_OUTPUT then print(message) end
13end
14 
15local function SaveData(player)
View all 57 lines...

In the game, it works perfectly. Never had a problem with it, always gets the data right, etc etc. In the process of building another game, I used the same script (save to roblox, open from mymodels) for this function and the same script that I had in the other game to create the stats.

to shorten: I have this script to save/load and another to create the stats for new players in a game. I have these identical scripts in another game I am building.

My problem is: In the new game (with nothing different) I get this error every time the script tries to load the playerdata on join, and then no other part of the script ever fires:

502: API Services rejected request with error: HTTP 0 (HTTP 403 (HTTP/1.1 403 Forbidden))

My script isn't even trying to connect using an api, it's just connecting to datastore service. Can anyone tell me what's going on here?!

The line that the error code comes up for is line 38 in the script. The script that has the error is the script attached.

0
reason I asked if they are broken is becuase this script still works in the other game DANISSY1 2 — 7y

1 answer

Log in to vote
0
Answered by 7 years ago
Edited 7 years ago

The error has nothing to do with the script, I don't really remember but it has either to do with not allowing studio access to the datastore or it is a team create problem (I don't remember as they look pretty much the same)

0
Alright. Do you remember how to fix either of those? DANISSY1 2 — 7y
1
Check "Your Game > ... > Configure this Game > Enable Studio Access to API Services" should be checked if you are testing from Studio. SametTurkey 1 — 7y
0
Team create cannot be fixed as only the owner can access datastores, if you want to test it with it you can copy the place, it will work in normal studios with both errors though User#20388 0 — 7y
0
(SametTurkey answered the studio access problem) User#20388 0 — 7y
View all comments (6 more)
0
What? The owner can access datastores and view what's in them? I've been looking to do that for ages! (If it's alright, please share how here) DANISSY1 2 — 7y
0
The owner can view the datastore data? I've been looking for how to do that for ages and it has not once come up with a result. As for the fixes, thanks. I'll try them out as soon as I can. DANISSY1 2 — 7y
0
You can view datastores but you'll have to know the players id (if you're working with a playerdatastore) and it needs to be ingame, you cannot view it from outside, please set this question to best answer User#20388 0 — 7y
0
answer* User#20388 0 — 7y
0
you got it right both times. I've set the question as answered. Thanks a lot for your help. DANISSY1 2 — 7y
0
Np :) User#20388 0 — 7y
Ad

Answer this question