Why is RoProxy working slow for me?

Hi Guys, so I used RoProxy for getting all the gamepasses and shirts a player created. My friend also created the same thing and almost the same code but his requests are fast enough and his requests doesn’t fail much. But for me, it fails almost everytime. I understand proxies can fail or be slow, but for my friend, it works fine. Why could be RoProxy so slow for me?

(Code is just some pcalls [2 pcalls only and reasonable] and functions where it clones)

No replies yet… Doesn’t anyone know how to use it or just ignoring me? Nvm. I’m still open for answers.

RoProxy? I have never heard of that. Can you tell me what that is? Thanks!

1 Like

We need the code… If you can give us that, we can assist you but we can give you conjectures for days but we can’t do anything with finality if we don’t have the code.

2 Likes

When you try to access Roblox API, you directly can’t. So you need a proxy to access it using Studio. This is what RoProxy is ment for.

There isn’t anything special to help with. As I said above, my code works but I don’t understand why the request fails almost every time. I could send you the original code after some time if you could wait. Sorry for taking so much time.

That’s fine! I don’t mind waiting.

2 Likes

Can you send the code? I can wait as well :smile:

2 Likes

put the code with three backticks through the code like this

```lua
-- put some code here
```

and it becomes this:

-- put some code here
1 Like

Hmm, I know this. I have already sended code like thousand times.

@Midnightific @CalebIsCool785 & @VSCPlays this is the code

local bindables = script.Parent.Parent.BindableEvents
local http = game:GetService("HttpService")
local MPS = game:GetService("MarketplaceService")

local shirttable = {}--get all the shirts here
local passtable = {}

function getAllItems(name, userid)
	print("entered function")
	local shirts = "https://catalog.roproxy.com/v1/search/items/details?Category=34&CreatorName="..name -- to get all the shirts
	local passes = "https://web.roproxy.com/users/inventory/list-json?assetTypeId=34&cursor=&itemsPerPage=100&pageNumber=1&userId="..userid -- get all the passes

	--using pcall to make sure error doesn't happen
	local success, result, result1 = pcall(function()
		return http:GetAsync(shirts), http:GetAsync(passes)
	end)

	if success then
		print("success")
		local success2, shirt, pass = pcall(function()
			return http:JSONDecode(result), http:JSONDecode(result1)
		end)
		if success2 and shirt and pass then
		for i, shirtid in pairs(shirt.data) do
			print(shirtid.id)
			table.insert(shirttable, shirtid.id)
		end

		for i, passid in pairs(pass.Data.Items) do
			if passid.Creator.Id == userid and passid.Product.IsForSale == true then
				print(passid.Item.AssetId)
				table.insert(passtable, passid.Item.AssetId)
			end
		end
	end
else
	warn("It errors")
end
	return shirttable, passtable
end

function clonePasses(content, boothname)
	for i,v in pairs(content) do
		local data = MPS:GetProductInfo(v, Enum.InfoType.GamePass)
		if data and data.IsForSale then
			local gui = workspace[boothname].Products.Template:Clone()
			gui.Parent = workspace[boothname].Products[boothname].ScrollingFrame
			gui.Text = data.PriceInRobux.."$"
			gui:SetAttribute("Id", v)
			gui:SetAttribute("Type", "Gamepass")
		end
	end
end

function cloneShirts(content, boothname)
	for i,v in pairs(content) do
		local data = MPS:GetProductInfo(v, Enum.InfoType.Asset)
		if data and data.IsForSale then
			local gui = workspace[boothname].Products.Template:Clone()
			gui.Parent = workspace[boothname].Products[boothname].ScrollingFrame
			gui.Text = data.PriceInRobux.."$"
			gui:SetAttribute("Id", v)
			gui:SetAttribute("Type", "Shirt")
		end
	end
end

bindables.GetAssets.Event:Connect(function(player, boothname)
	local shirt, pass = getAllItems(player.Name, player.UserId)
	if shirt and pass then
		clonePasses(pass, boothname)
		cloneShirts(shirt, boothname)
	end
end)

game.Players.PlayerRemoving:Connect(function(player)
	if script.Parent.Parent.Cube.Claim.Owner.Value == player then
		script.Parent.Parent.Title.SurfaceGui.TextLabel.Text = "unclaimed"
		script.Parent.Parent.Cube.Claim.Enabled = true
		for _, button in pairs(script.Parent.Parent.Products[script.Parent.Parent.Name].ScrollingFrame:GetChildren()) do
			if button:IsA("TextButton") then
				button:Destroy()
			end
		end
	end
end)

Hmm, that’s weird. There doesn’t seem to be any problems in the code. Maybe it’s based on the amount of requests being sent to the roproxy at the same time?

1 Like

It’s just 2 requests as you could see above.

My guess (from experience): it’s a proxy. It’s hosted by some random person on the devforum, it’s not completely reliable. You’re essentially relying on a single point of error to give your information. It works better sometimes than other times.
Best way to do it is to host a proxy yourself, precoded proxies already exist if you don’t know how to code them.

1 Like

I understand. But why it really works for my friend very well, I don’t really get it. He also have almost the same code. From your point of view, it’s his luck? I think.

1 Like

Are you sure it’s roproxy? This part seems like it could be yielding quite a lot.

1 Like

Honestly, proxies are unpredictable. I don’t know why it’s working better for them than for you, your code looks fine from what I see

1 Like

Yes, it’s RoProxy and the problem isn’t yielding here. The part of code you highlighted could only run when everything is loaded. My main problem is that many times it fails to get the response. It works well for my friend although.

The title implies that RoProxy is running slow or taking a long time per response. I suggested it was actually MarketplaceService:GetProductInfo. Now it’s just that the responses error?

Yes, for some reason, it errors commonly.