I am going to wait before making a bug report as it could be an issue with my script, even though the output says otherwise.
Anyway, I’m getting the following error for some reason: Error: 502: API Services rejected request with error. HTTP 403 (Forbidden), however Studio API Services are enabled for datastores and the like, so I’m not sure why this is the case.

Here’s my script, I’m attaching it as there could be other errors and Studio is working fine. I should also add that I’m in the beta program so that could be an issue as well.
If I don’t get any success, I’ll make a bug report.
The script is a simple datastore script to save an IntValue.
Script:
local DS = game:GetService("DataStoreService"):GetDataStore("Stages")
game.Players.PlayerAdded:Connect(function(player)
local leaderstats = Instance.new("Folder",player)
leaderstats.Name = "leaderstats"
local stage = Instance.new("IntValue",leaderstats)
stage.Name = "Stage"
stage.Value = 0
local dataKey = "key-"..player.UserId
local data
local success,errormsg = pcall(function()
data = DS:GetAsync(dataKey)
end)
if success then
print("success for "..player.Name)
if data ~= nil then
stage.Value = data
print("data found "..player.Name)
else
print("new player "..player.Name)
stage.Value = 0
end
else
warn("error "..player.Name..". error: "..errormsg)
stage.Value = 0
end
end)
game.Players.PlayerRemoving:Connect(function(player)
local success,errormsg = pcall(function()
DS:SetAsync("user-"..player.UserId,player.leaderstats.Stage.Value)
end)
if success then
print("success"..player.Name)
else
warn("error "..player.Name..". Error: "..errormsg)
end
end)
TIA for the help! 