Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Can anyone help me solve this API Services error?

Can anyone help me? I can't solve it? Its in edit from a friend and i am in TeamCreate.

game.Players.PlayerAdded:Connect(function(player)
	local admins = {"MaxDev_BE"}
	local politiedata = game:GetService("DataStoreService"):GetDataStore("politie")
	
	local ranks = Instance.new("Folder")
	ranks.Name = "Rank"
	ranks.Parent = player
	
	local politie = Instance.new("BoolValue")
	politie.Name = "Politie"
	politie.Parent = ranks
	politie.Value = politiedata:GetAsync(player.UserId) or false
end)

error: 502:API services rejected request with error: HTTP 0(HTTP 403(HTTP/1.1 402 Forbidden)) -- line 12

3 comments

0

Make sure your games DataStore API Service is enabled in your games configuration settings on the Roblox Website under basic settings make sure Enable Studio access is enabled.

0

Make sure "Studio Access to API Services" is ticked.

0

yes, it is enabled .

1 answer

✓ Accepted answer

I've had this problem before, IIRC it has something to do with the fact that you don't own the game and it's your friend's.

I don't remember exactly how I got around it, but I think you can only test it out in the actual player (and not in studio). Also try getting your friend to run it.

1 comment

0

Okey!

This discussion is preserved as it was. New answers, comments, and votes are closed.