Adding accessories on the client?

I’m asking this question because I am currently making a character customization for my game. There is a rig in workspace that is NOT the player’s character. It is more or less a dummy positioned in a room for players to add accessories too and try out outfits etc


Anyways, simply parenting accessories OR using humanoid:AddAccessory() does not work for some reason. The accessories just end up somewhere far away.


Before anyone asks, yes, the attachments are set up fine.


This brings me to my final question, how can I manually attach the accessories? I know there are some offset properties and what not, so I’d love to figure out how to incorporate that.

TLDR; How does the humanoid:AddAccessory() function actually work / how can I replicate the behavior of the function in my own code?

I know this topic was posted a few days ago by someone else but the answer given was a method that would be very time consuming + tedious.

1 Like

Make sure the dummy and the accessory are both unanchored.

If that doesn’t fix the issue, try changing the accessory’s Part1 property of the AccessoryWeld.

1 Like

I’ll give that a shot! Thanks for the help :slight_smile:

Well, I found the issue. An accessory weld is never created. I would manually create one in the script but then the hat wouldn’t be offset correctly, right?

My current code:

local handle = object:WaitForChild("Handle")
			
object.Parent = workspace
rig:WaitForChild("Humanoid"):AddAccessory(object)
			
local accessoryWeld = handle:WaitForChild("AccessoryWeld")
accessoryWeld.Part1 = rig:WaitForChild("Head")
1 Like

Make sure your accessory has all attachments needed.
Maybe this will help you.

1 Like

That solution actually worked pretty well! The only problem is that my hats and hairs are floating. I still don’t really get why but I assume that the offsets aren’t taken into account. Thats still what I need to figure out

Try to unanchor the head and set Network Ownership of the accessory to nil.

The accessory is created on the client so I can’t set its network ownership. The entire rig model is completely unanchored.

I’ve seen this solution but I would much rather do this using a script instead of having to manually do each accessory. I just need to figure out how to offset the hat from when it gets positioned relative to the attachments.

good luck then, roblox pretty :poop: with locally adding accessories and hats

but hey if you find a solution let us know

EDIT 2023: If anyone reads this, this is NOT the proper way to do this. do not waste your time with the above, you’re going to have to use client-server communications, the server must applyaccessory to the VPF humanoid, follow what I stated here:

HumanoidDescription not loading the hair on a Dummy - #12 by Juicy_Fruit

ensure the dummy is already inside playergui (so existing in studio view in the vpf in playergui)

1 Like

I have now realized that I am incredibly dumb; I was welding the handle of the hat to the handle of the hat (causing it to just rest on top of the head making it look like it floats). The offsets are done for me. Thank you so much for this resource!

I am also adding accessory in the client side but I just wanna ask if the accessory will be seen by other players or only the client?

if you clone the specific item for the local player then only that local player will see it.

1 Like