Hey everyone,
Right now, a colleague and I are attempting to design an in-game avatar customization system. Whilst some things are going smoothly, I would like to seek some assistance with gathering accessory ID’s from an in-game character (for example, someone who has used our customization system to customize their character to their liking and then wants to save it).
Some solutions I have already tried aren’t producing the best results, including:
local players = game:GetService("Players")
local function playerAdded(player)
player.CharacterAppearanceLoaded:Connect(function(char)
local humanoid = char:WaitForChild("Humanoid")
print(players:GetHumanoidDescriptionFromUserId(player.UserId):GetAccessories(true)) -- this should print the accessories, which it does, but it does so for the website avatar.
end)
end
players.PlayerAdded:Connect(playerAdded)
This results in the script printing the accessory ID’s as intended, however they come from the website avatar, which is what I’m trying to avoid.
Along with this code attempt, I have attempted to dig deeper into the functions of the HumanoidDescription with no luck.
Any assistance on this matter would be greatly appreciated, thank you!