How to change character appearance (Shirt, Pants and Accessories)

Hello, I’m Eco and I’m basically making a halloween themed game and at a part, you are supposed to choose your own outfit to wear and go trick or treat! :shallow_pan_of_food:

This is a GUI that will appear on the screen for all the players to choose their outfits…

Now, how do I make it so if the player clicks any of the buttons then the shirt, pants and the accessory (mask) will be put to the player.

I want to make this server-sided so other players can also see what others picked.

7 Likes

If you have the asset ID for each of the clothing items in the UI, you can simply set the ShirtTemplate and PantsTemplate of the Shirt and Pants objects underneath the player’s character model to that ID and it should update accordingly.

See these articles: Shirt | Documentation - Roblox Creator Hub
Pants | Documentation - Roblox Creator Hub

3 Likes

I got it working, thank you a lot! <3

1 Like

Uh oh, I guess I’ve some troubles… I tried to clone the accessory mask to the player but it looks like it’s not realy working… Shirts and pants works perfectly but the masks don’t fit well, do you know how can I fix it?


I also tried cloning it through dummy and ReplicatedStorage

1 Like

You will have to Grip the accessory in a way which fits best. There are accessory grip editor plugins out there that let you do it easily. They are similar to the tool grip editors. You can also manually edit their grip through the properties of the accessory but it might be confusing at first.

You can use HumanoidDescription. There is a function called Humanoid:ApplyDescription(HumanoidDescription). If you want a player’s HumanoidDescription, you can use game.Players:GetHumanoidDescriptionFromUserId where you simply insert the UserId and it will return a HumanoidDescription. You can also make a custom HumanoidDescription.

3 Likes

okay heres how i do it

  1. loop through children of character and delete anything that’s a accessory
  2. clone the accessories of the new character and parent (ex. put the meshes etc that are on your mime into accessories)
  3. add clothing

if you use a humanoid description, remember to create a respawn function because it doesn’t automatically respawn someone when using one

1 Like

This one worked for me! :smiley: Thanks everyone for helping!