How would I go about making a character customization menu?

I am trying to make a character customization menu and to my knowledge, the NPC which is to be edited has to be in the client’s camera. As you can see in the attached screenshot, on the left there is my Player, in the middle there is the NPC in the client’s camera and on the right there is the same NPC in the workspace.

However, what is happening is that the animations in the NPC in the client’s camera stop working.

Since I have Filtering Enabled on, I thought of putting an NPC in the workspace and the clients can change this NPC’s clothing on their client, but it doesn’t seem to be allowing me to equip the hat from ReplicatedStorage to the NPC in the workspace.

How would I go about making a character customization menu?

8 Likes

I don’t fully understand what you’re asking, but the reason the animations aren’t working is because local scripts have to be in the backpack, startergui, character, etc. to work and if you parent a hat to an NPC on the client, the client doesn’t create the welds between the hat and the humanoid like it should (unless this has been fixed and i haven’t noticed)

2 Likes

Because I plan to have an NPC which you can change his accessories for example, but if I parent it to the CurrentCamera, the animations break, so I tried another alternative which is to have 1 NPC in the workspace and the players can change the NPC’s accessories locally but apparently I don’t think I can do that either.

1 Like

could you not create a remote function to ask the server to build the npc with the desired appearance, then handle the rest on the client ?

1 Like

Wouldn’t that give me the same results as the other alternative which I already tried which is that I put an NPC in the workspace beforehand?

1 Like

I’m currently working on an in-game avatar editor, quite like you’re doing - what I do, is let the client have a dummy character which it can play animations on, add accessories to, add clothing to, etc. - the only task that the server handles is when the client needs to fetch a new asset, such as an accessory, animation package etc., given the asset id is known to the server as safe to load.

With FilteringEnabled / non-experimental games, it doesn’t really matter where in your Workspace a dummy model is put, and since it’s meant as a per-player editor (hopefully in your case too?), the changes that a client makes can be made as easy as if you changed your normal character.

As for applying clothing, I use Humanoid:AddAccessory for cloned local accessories. The client also plays all animations on the dummy, and rebuilds the model when you swap body package limbs.

GIF

The background is a BillboardGui positioned behind the dummy - the rest of the UI is a ScreenGui.

https://i.imgur.com/riyGc7k.gifv

5 Likes

“Let the client have a dummy character which it can play animations on”? Must I put it in the CurrentCamera?

1 Like

With FilteringEnabled / non-experimental, it can be in Workspace, and not necessarily has to be in the CurrentCamera.

1 Like

Thanks, although I have a problem occurring which is that Humanoid:AddAccessory is putting the hat into the dummy but the hat itself is not being welded to the head of the dummy. :disappointed_relieved: (I am doing this through a local script as I want it to be locally)

1 Like

There’s a solution to your problem here:

2 Likes

Thanks man