In my game I have a customization system (in this system, players can customize their hairs). For my system, I am using Humanoid:AddAccessory, to create a new hair accessory for the player to wear. However, the problem I am having is that the hair accessory is not scaling correctly, and in the screenshot below, you can see that the hair takes up over half the face.
I have tried changing the scale values on the mesh, the size of the handle under the accessory, and the positions, but I have not come to a solution. I am looking for any idea on how I can make these hair accessories scaled and properly fitted to the character. Below is the code that handles the hair accessory creation.
I have tried your suggesstion, and even after adding a y value to the HairAttachment.Position, in this case I did HairAttachment.Position + Vector3.new(0,10,0),
and no change occured. As you can see in the screenshot, the hairattachment did in fact move up, but the hair accessory itself did not change at all.
Also, even if this did work, wouldn’t it vary per hair and per body type of the character? Is there any kind of universal method that scales and positions the accessory to fit on any kind of character?
I tried the other method you suggested by storing them and calling upon them, however, still getting the same issue with the HairAttachment not changing the accessories position when I change the y value for HairAttachment. I also tried changing the y position of the handle as well, and no change.
Another issue related to this is that some items come scaled out crazy. For example in this image, this witches hat is extremely large, meanwhile another item using the same mesh scaling will come out a completely different size and nothing is scaling to the character.
How do these top games such as Royale High or MeepCity make the items in their massive shops scale to players? I’m quite confused on how they accomplish this.
I personally stopped using SpecialMesh since the advent of MeshPart. Not only does it allow you to add materials to existing meshes unlike SpecialMesh, but you can treat the mesh and the part as one instance. Never had an issue with hat rescaling since, because changing the MeshPart’s size also means changing the mesh size. It doesn’t rely on a separate instance.
Another point is that I don’t arbitrarily create accessories. I always keep them stored in a storage service if I know exactly what I want and then I work from there. I’m not a fan of arbitrary creation so I always try and hardcode where possible. Probably not a good habit but gets rid of weird issues the best.