Accessory Adjustment APIs for Neck, Shoulder, Front, and Back

Hi Creators,

We’re excited to announce the launch of the Accessory Adjustment Tool APIs for Neck, Shoulder, Front, and Back Accessories. Last year, we introduced the Accessory Adjustment tool for Head and Face Accessories in the Avatar Editor and with APIs for adjustment within your experiences.

Today, we’re expanding to include Front, Back, Neck, and Shoulder accessories. Using the upgraded HumanoidDescription API, you can allow users to adjust the position, rotation, and scale of those accessories on their avatars – whether they own the items or are previewing them before purchasing. This opens up a whole new level of compatibility between avatars and their accessories.

accessory-adjust-devforum0320 (1) (1)

When users own adjusted accessories, these changes can be saved to the platform via AvatarEditorService:PromptSaveAvatar. You can also pair this with PromptCreateOutfit to let users save their full Avatar, including adjustments, under Characters > Saved.

Here’s an example server script and local script you can try out yourself:

Server Script:

-- Accessory Adjustment server script

local Players = game:GetService("Players")
local userId = -1 -- replace with your userId
local playerModel = Players:CreateHumanoidModelFromUserId(userId)
playerModel.Parent = workspace
local humanoid = playerModel.Humanoid
local newHD = game.Players:GetHumanoidDescriptionFromUserId(userId)
local accessoryDescription = Instance.new("AccessoryDescription")
accessoryDescription.AssetId = 98752422639730 -- add a Back Accessory that you own
accessoryDescription.AccessoryType = Enum.AccessoryType.Back
accessoryDescription.Parent = newHD
playerModel.Humanoid:ApplyDescription(newHD)

for i, description in humanoid.HumanoidDescription:GetChildren() do
      if description:IsA("AccessoryDescription") then
            -- AccessoryDescriptions also help you get the Instance of the accessory, which will be helpful in adjustment
            -- For example, we can show the user which accessory is selected by adorning a SelectionBox
            local selectionBox = Instance.new("SelectionBox")
            local accessoryInstance = description:GetAppliedInstance()
            -- Adorn to the MeshPart Handle under the Accessory Instance

            selectionBox.Adornee = accessoryInstance.Handle
            selectionBox.Parent = workspace

            -- setting the adjustments
            description.Position = Vector3.new(0.2, 0.2, 0.2)
            description.Rotation = Vector3.new(20, 20, 20)
            description.Scale = Vector3.new(1.1, 1.1, 1.1)
      end
end

local appliedDescription = humanoid.HumanoidDescription:Clone()
appliedDescription.Name = "AppliedDescription"
appliedDescription.Parent = workspace

Local Script

-- Accessory Adjustment local script
local AvatarEditorService = game:GetService("AvatarEditorService")

-- get the appliedDescription made from our server script
local appliedDescription = workspace:WaitForChild("AppliedDescription")
-- save the avatar with the adjustments
AvatarEditorService:PromptSaveAvatar(appliedDescription, Enum.HumanoidRigType.R15)
--same with PromptCreateOutfit to create outfits
--AvatarEditorService:PromptCreateOutfit(appliedDescription, Enum.HumanoidRigType.R15)

We’ve also updated the Avatar Rules to let you access the newly allowed AssetTypes and adjustment limits, which you can find here:

local AvatarEditorService = game:GetService("AvatarEditorService")
local avatarRules = AvatarEditorService:GetAvatarRules()

–- AccessoryRefinementTypes is a list of the allowed AssetType values
print(avatarRules.AccessoryRefinementTypes)
–- AccessoryRefinementUpperBounds is a table of the allowed upper adjustment limits for each accessory type
print(avatarRules.AccessoryRefinementUpperBounds)
–- AccessoryRefinementUpperBounds is a table of the allowed lower adjustment limits for each accessory type
print(avatarRules.AccessoryRefinementLowerBounds)

AccessoryRefinementUpperBounds and AccessoryRefinementLowerBounds allow you to check that your experience doesn’t apply an adjustment that can’t be saved to the platform. Trying to save values out of the bounds will clamp the values during saving.

We can’t wait to see how you incorporate these new capabilities into your experiences!

Special thanks to the team that helped make this happen: @JollySunbro6, @Peaze4ly, @gcheck14552, @cyrian_sun @Nimniteshyamalan, @LoboTheCzarnian, @legendRf20, @SergeantBlocky, @misterpebblez, @Padi_Xiaokeai, @pbloxi, @Vvhere2021, @FarazTheGreat, & @timetopretend8.

89 Likes

This topic was automatically opened after 10 minutes.

Can we have it for waist accessories too? People who roleplay LEO (law enforcement officers) are usually restricted to how much customizability they have on their duty belts, guns, tasers etc…

29 Likes

What we all waited! Thank you Roblox :smile:

Also, what kind of avatar items does that account have in that gif :skull:

6 Likes

Very cool

When will this be next?

I call it “giving it precision”.

And I call “Slider Center Snapping” fast flag, the ones that “takes away precision”

4 Likes

I can foresee plenty of catalog trial / avatar creator games using this. Unfortunately, none of these API’s have shown much promise outside of them though.

3 Likes

Wait, I can not yet rotate my hat 360°… :thinking:

3 Likes

Super happy to see this capability finally expanded.

Can we hear about your plans to bring these advanced avatar tools to the web frontend? What does the future of avatar customization look like on desktop web?

It doesn’t seem like I’m able to use this on anything except the phone app, not even the Windows UWP app has it, the accessory tweak button is simply missing.

5 Likes

I didn’t expect this update but W update, no downsides. The avatar is epic as well.

6 Likes

Would be nice if we could have these capabilities for hair too, would fix a lot of clipping issues that relate to say, head type rather than hats.

7 Likes

Still waiting to be able to colour body parts any colour from the avatar editor instead of having to go into catalog avatar creator

2 Likes

Your version must be outdated-- it has been on the windows app since the first realease.

2 Likes

TOS breakers are gonna get a kick out of this…

1 Like

To answer why it could be missing on the Windows UWP app, if you update to version 665 it should always appear. Please let us know if it’s still missing after the update!

3 Likes

Can we have unlocked axises on the scale. I still cant fit collars properly on my rig because it has a non 1:1 depth-width scale

also 1.25 isn’t a big enough limit to fit it anyway.

6 Likes

@meiyonnaize could I ask if hair is planned for this too?

That’s really my only use case with this feature as I keep my avatar the same 99% of the time.

5 Likes

For accessory adjustment on the web frontend: we don’t have plans to add it there, but the UI in the Avatar Editor/Marketplace or in another experience would be the best way to use accessory adjustment today

2 Likes

Since shoulder accessories can now be adjusted, I’d like to repost this:

5 Likes

Thanks! Is there anything you can share regarding the future of avatar customization on the web frontend? All new avatar features are only being built into the app. Building the same thing in more than one place went out of style a long time ago, I get it.

If this is the plan, I wanted to share that there have been growing pains over this for 4+ years already now. Avatar customization on web is pretty bad in comparison to the app, but I have two decades of muscle memory that takes me to the customize avatar webpage anyway. There is significant friction for me to open the app on either my phone or desktop seeing as I am a developer and already live on the website in my browser. It would be great if we could get shortcuts on desktop web that go directly into the Roblox app’s version of that page. I.e. Button “Customize in App” opens the app directly to the avatar customize page. :pray:

Edit: I put this into a feature request: Shortcuts to "Open in App", but any info would still be appreciated.

6 Likes

Thank you for pointing out this behavior, we’re looking into whether this issue should be solved by accessory adjustment or through other means

2 Likes