Get clothing for sale from group

I’m making a game for my clothing group which would have a scrolling frame gui which automatically loads in each of the clothing items so you can click it to buy it, rather than having to do it manually, but how can i do this? Thanks

local avatarEditorService = game:GetService("AvatarEditorService")

local group = game:GetService("GroupService"):GetGroupInfoAsync(YOURGROUPIDENTITY)--//your group id

local catalogSearchParams = CatalogSearchParams.new()

catalogSearchParams.AssetTypes = 
	{
		Enum.AvatarAssetType.Hat,
		Enum.AvatarAssetType.Shirt,
		Enum.AvatarAssetType.Pants
		--// you can add more if you want using Enum.AvatarAssetType, must be in a table
	}
catalogSearchParams.CreatorName = group.Name


local pages = avatarEditorService:SearchCatalog(catalogSearchParams)

local currentPage = pages:GetCurrentPage()

for i = 1, #currentPage do
	local item = currentPage[i]
	print(item)
end

use this to get group items.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.