NPCs with random assets from catalog

Hello, i wanted to do an NPC with random accessories, shirts, ecc… taking them from the catalog, how do I get an array containing all ids of assets in a sub category? This topic didn’t help me so I’m starting a new topic.

2 Likes

I saw the catalog UI but I wasn’t successful in understanding the part of the code that gets the catalog ids.

There are NPC generator plugins.

I have a normal dummy and I want to give him clothes ecc randomly based on catalog ids. Not in studio I need a script to generate a random appearence dummy.

I think you could just get roblox’s inventory through HTTPService and a proxy (since roblox has all hats in his inventory) and then add all the items to a table and pick randomly from there.

1 Like

What’s the function to get the hats in the inventory of a player, and also what’s proxy and how would I use it?

Proxy is a whole new level. It requires you to have advanced knowledge of HttpService and HTML5/JSON to Lua coding basics.

Using a proxy, you have to use the built-in Roblox API to use GetInventory (or whatever the http function is).

Learn more about the roblox api and find out what endpoint suits your needs and then pass the request to rprxy.xyz instead of the API since HTTPService doesn’t allow direct requests to the API.