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

problem with DataStore '403: Cannot write to DataStore from studio if API access is not enabled'?

Asked by 7 years ago

i don't know what i did wrong to get this output '403: Cannot write to DataStore from studio if API access is not enabled.'

**If you need any more information about the script just comment thanks already **

the full output is: ' 14:21:54.090 - 403: Cannot write to DataStore from studio if API access is not enabled. 14:21:54.090 - Stack Begin 14:21:54.091 - Script 'ServerScriptService.Stats', Line 18 - global savedata 14:21:54.091 - Script 'ServerScriptService.Stats', Line 91 14:21:54.092 - Stack End '

line 17-18-19:

1function savedata(dataname, playerid, value)
2    game:GetService("DataStoreService"):GetDataStore(dataname):SetAsync(playerid, value --line 18
3end

line 90 - 95

1game.Players.PlayerRemoving:connect(function(player)
2    savedata("Levels", player.userId, player:WaitForChild('Stats').Level.Value) -- line 91
3    savedata("XP", player.userId, player:WaitForChild('Stats').XP.Value)
4    savedata("AXP", player.userId, player:WaitForChild('Stats').XpNeeded.Value)
5    savedata("Cor", player.userId, player:WaitForChild('Stats').Cor.Value)
6end)

FULL SCRIPT:

01local level = game:GetService("DataStoreService"):GetDataStore("Levels")
02local xp = game:GetService("DataStoreService"):GetDataStore("XP")
03local axp  = game:GetService("DataStoreService"):GetDataStore("AXP") -- amount needed
04 
05local cor = game:GetService("DataStoreService"):GetDataStore("Cor") -- money
06 
07local OHS  = game:GetService("DataStoreService"):GetDataStore("OneHandedSword")
08local = game:GetService("DataStoreService"):GetDataStore("Rapier")
09local THS  = game:GetService("DataStoreService"):GetDataStore("TwoHandedSword")
10 
11local Agility = game:GetService("DataStoreService"):GetDataStore("Agility")
12local Stamina = game:GetService("DataStoreService"):GetDataStore("Stamina")
13local Strength = game:GetService("DataStoreService"):GetDataStore("Strength")
14 
15---------------------------------------------------------------------------------
View all 95 lines...

1 answer

Log in to vote
0
Answered by 7 years ago

Hey!

This is an easy fix, what you wanna do is go on to the place on the roblox.com website then go on the game page where it says play. Then click the 3 dots and click configure game, after that tick the option that says 'Enable Studio Access to API Services'

Hope this helps!

0
Thank you! TigerClaws454 48 — 7y
Ad

Answer this question