How do I use GetBundleDetailsAsync() to put a bundle on a character?


Assume I want my rig to look like this:

How do I use GetBundleDetailsAsync() to get the package info I need and then dress my character up in that package? I’m not sure what to do with everything it returns and the dev hub is literally useless. Thanks :slight_smile:

1 Like


Related Documentation Request: No information on GetBundleDetailsAsync

So, I went and wrote a fairly lengthy script to fetch what this API returns. I seem to have a general understanding of what it looks like, so however you use this information is up to you. I believe there are samples of this API’s usage around the DevForum, but that’s all I know.

-- Usage
local Details = game:GetService("AssetService"):GetBundleDetailsAsync(374)

number Id
string Description
string Name
string BundleType
table Items

In the Items table are more tables representing the parts of the bundle. Each table is structured as follows:
number Id
string UserOutfit
string Name

On another note though, I did find some code related to the usage of GetBundleDetailsAsync by @CloneTrooper1019 on a Release Notes tab. This is for when Humanoid descriptions are live, so if you’re keen on waiting for that, there’s one way to help with this. Code here.

There’s also a plugin by @Stickmasterluke you can check the source code of to see how he uses GetBundleDetailsAsync to change bundles. That post is here.


No information on GetBundleDetailsAsync

When I unpack this and attempt to print, I get an output of nil. Why would this be the case?



It’s returning a nil value because the return of GetBundleDetailsAsync is a dictionary, not a standard table. If you try unpacking a dictionary/array, you’ll get a nil value. You can experiment using another dictionary as well.

local Table = {"Yes", "No", "Maybe"}
print(unpack(Table)) --> Yes No Maybe

local Dictionary = {["Yes"] = true, ["No"] = false, ["Maybe"] = 0}
print(unpack(Dictionary)) -->

Whereas you can use unpack on a table with only values and not keys, you will have to iterate through a dictionary or index its members directly.



Thanks so much for taking the time to do that man. I’ll definitely check it out when I have a sec!

1 Like


I reverse engineered what it returned by passing the response dictionary into HttpService:JSONDecode(), then I passed the JSON string into a JSON beautifier so I could see the structure of the dictionary.

My Bundle Giver handles all of the provided data manually, but I’ll probably update it to use some of the new HumanoidDescription APIs once they’re enabled.