I’ve looked around on all different websites, but can’t seem to find the issue to this problem.
And yes, I have DataStores enabled in studio.
I’m using DataStore2 at the moment, but this still occurs with standard DataStore.
As a control, I’m using the simulator example on DataStore2’s documentation.
local Players = game:GetService("Players")
local ServerScriptService = game:GetService("ServerScriptService")
local Workspace = game:GetService("Workspace")
local DataStore2 = require(ServerScriptService.DataStore2)
DataStore2.Combine("DATA", "points")
Players.PlayerAdded:Connect(function(player)
local pointsStore = DataStore2("points", player)
local leaderstats = Instance.new("Folder")
leaderstats.Name = "leaderstats"
local points = Instance.new("NumberValue")
points.Name = "Points"
points.Value = pointsStore:Get(0)
points.Parent = leaderstats
pointsStore:OnUpdate(function(newPoints)
points.Value = newPoints
end)
leaderstats.Parent = player
end)
This immediately errors about the 502 error.
And for the control on regular DataStores:
info = datastore:GetAsync(player.UserId);
I cannot show the entire code-block for personal reasoning, but any form of DataStore methods result in the error API Services rejected request with error. HTTP 403 (Forbidden)
Are there any things I can try?