So my friend wants me to make a suggestion board for her group and it basically allows players to type in suggestions for clothes in her group and it adds it to the board and saves it as a global variable so when my friend enters the game she can read the suggestion and write it down. However, once I test it, type in a suggestion, and click confirm, it pops up with this error.
If you know what is going on, please let me know. (Also I've never done a global leaderboard or OrderedDataStore before so I followed the tutorial by TheDevKing and I'm not sure if it can save sentences instead of numbers, but I tried to do it anyway. If there is a different way I should be doing this, please let me know.)
Here is the code
local DataStoreService = game:GetService("DataStoreService")
local suggLeaderboard = DataStoreService:GetOrderedDataStore("suggLeaderboard")
local remote = game:GetService("ReplicatedStorage"):WaitForChild("SuggestionEvent")
remote.OnServerEvent:Connect(function(player, suggestion)
local success, errormessage = pcall(function()
local Data = suggLeaderboard:GetSortedAsync(false, 5)
local suggPage = Data:GetCurrentPage()
for rank,Data in ipairs(suggPage)do
local username = game.Players:GetNameFromUserIdAsync(tonumber(Data.key))
local Name = username
local sugg = Data.Value
local isonleaderboard = false
for i, v in pairs(game.Workspace.GlobalLeaderboard.LeaderboardGUI.Holder:GetChildren())do
if v.Name.Text then
isonleaderboard = true
end
end
if sugg and isonleaderboard == false then
local newLbFrame = game.ReplicatedStorage:WaitForChild("leaderboardFrame"):Clone()
newLbFrame.Name.Text = Name
newLbFrame.Suggestion.Text = suggestion
newLbFrame.Position = UDim2.new(0, 0, newLbFrame.Position.Y.Scale + (0.08 * #game.Workspace.GlobalLeaderboard.LeaderboardGUI.Holder:GetChildren()), 0)
newLbFrame.Parent = game.Workspace.GlobalLeaderboard.LeaderboardGUI.Holder
end
end
end)
if not success then
print(errormessage)
end
end)

5 comments
It means you don't have permission to access the DataStore API due to inferior credentials. It can only be acess by the primary owner of the place (including TC sessions); the script must be sanctioned by this user. It's also Data.value*
As @Feahren said you cannot use datastores if you're not the owner of the place. I've already answered this question here https://scriptinghelpers.org/questions/104514/please-help-145039242-502-api-services-rejected-request-with-error-http-403-forbidden#96457
I am owner of this place and Team Create is not enabled. I guess I can try changing Data.Value to Data.value as Feahren said, and I'll see what happens.
K, the error is gone, but now it isn't doing anything? I'm not sure what the deal is.
https://gyazo.com/cfea5b14f2f6a211a9cdd2bb2148d4c3