You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? Keep it simple and clear!
i want to get a list if products/gamepass of a player and put it on a folder
What is the issue? Include screenshots / videos if possible!
how
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
i tried everything
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
i wont be putting a script because it not needed
Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.
ok thank you but i ran into a problem: here is my script currently
game.Players.PlayerAdded:Connect(function(plr)
local PF = Instance.new("Folder", plr)
PF.Name = "ProductFolder"
local HttpService = game:GetService("HttpService")
local CanSeeInventory = "https://inventory.roproxy.com/v1/users/"..plr.UserId.."/can-view-inventory"
local Response = HttpService:RequestAsync({
Url = CanSeeInventory,
Method = "GET"
});
if Response.Success then -- If it doesnst work, then idk
local Body = HttpService:JSONDecode(Response.Body) -- Decoding the table
if Body.canView == true then
local function GetPass()
local Table = "https://inventory.roproxy.com/v2/users/"..plr.UserId.."/inventory?assetTypes=Pass&limit=100&sortOrder=Asc"
local DecalResponse = HttpService:RequestAsync({
Url = Table,
Method = "GET"
});
if DecalResponse.Success then
local TableBody = HttpService:JSONDecode(DecalResponse.Body)
for i, v in pairs(TableBody) do
return v
end
end
end
local Pass = GetPass()
if Pass ~= nil then -- Avoid errors
for i, v in pairs(Pass) do
print(v.name, v.assetId, v.assetType) -- Q: It wasnt "Name?" A: Not here
end
end
else
game.ReplicatedStorage:WaitForChild("ProductEvents"):WaitForChild("WarnPlayer"):FireClient(plr)
end
end
end)
the problem is how to I get the gamepasses api to show the gamepass the player created