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

Why does this script error?

Asked by 9 years ago
local DataStore = game:GetService("DataStoreService"):GetDataStore("List")
key = "list1"

wait(5)

while true do

DataStore:UpdateAsync(key, function(oldValue)
local newValue = oldValue --oldValue might be nil
if game.Workspace.Game.RankUp.Value == true then
newValue = script.Parent.Parent.Parent.Name
end
return newValue
end)

wait(1)

end

Gets this error; Cannot write to DataStore from studio if API access is not enabled. Enable it by going to the Game Settings page.

1
Look at the error very closely on here.... GreekGodOfMLG 244 — 9y
0
There is not "API Access" in the game settings. adspace44 20 — 9y

1 answer

Log in to vote
0
Answered by 9 years ago

The answer is simple! It was right infront of you. Just go to your game's setting page and check both or one of the API settings! But make sure your game is an actual Game and not just a Place.

Ad

Answer this question