Replacing player's body parts meshes

Hello there !

I am trying to make a smooth R15 character for all players.
The character looks like this :

I have tried multiple ideas to change the character’s meshes, but none of them work.

The last idea I tried was to use findFirstChild to find the player’s character body parts meshes IDs and to replace them by the meshes IDs of the smooth character. Looks like this :

game.Players.PlayerAdded:Connect(function(Player)
	Player.CharacterAdded:Connect(function(Character)
		--torso
		Character.Humanoid:findFirstChild("UpperTorso").MeshId = "4915542510"
		Character.Humanoid:findFirstChild("LowerTorso").MeshId = "4915542414"
		
		--arms
		Character:findFirstChild("LeftUpperArm").MeshId = "5878593702"
		Character:findFirstChild("LeftLowerArm").MeshId = "5878593704"
		Character:findFirstChild("LeftHand").MeshId = "4915542334"
		
		Character:findFirstChild("RightUpperArm").MeshId = "5878685124"
		Character:findFirstChild("RightLowerArm").MeshId = "5878685126"
		Character:findFirstChild("RightHand").MeshId = "4915542334"
		
		--legs
		Character:findFirstChild("LeftUpperLeg").MeshId = "5878593720"
		Character:findFirstChild("LeftLowerLeg").MeshId = "5878593706"
		Character:findFirstChild("LeftFoot").MeshId = "4915542334"
		
		Character:findFirstChild("RightUpperLeg").MeshId = "5878685123"
		Character:findFirstChild("RightLowerLeg").MeshId = "5878685121"
		Character:findFirstChild("RightFoot").MeshId = "4915542334"
	end)
end)

But when I spawn, the meshes of the body parts of my character aren’t the ones that I put.

I have also tried to replace all the body parts by the other smooth body parts, by using Destroy() for the old parts.

I don’t really want to use StarterCharacter because I just want to replace the meshes of the body parts of the characters, not to replace everything.

I don’t really understand how Character Description works so I didn’t try it. I don’t know if that can help me.

Thank you.

3 Likes

I don’t really understand what you mean by smooth. It looks to me like you just changed the material.

To answer your question: It is impossible to change MeshId from scripts.
You’ll have to apply a HumanoidDescription to achieve that.

One way to do it is to clone the current humanoid description, change the Body parts’ id (In the humanoid description, not the parts themselves), and then use Humanoid:ApplyDescription() on that cloned HumanoidDescription, which will apply the same avatar with the meshes you changed.

Here are a few threads and resources that explain this in more detail:

Humanoid Description System

HumanoidDescription class

Humanoid:ApplyDescription()

Humanoid:GetAppliedDescription()

3 Likes

Alright, I will try to use that !
Thank you !

2 Likes

One more thing, I have noticed that the character description works with R6 system (LeftArm, RightArm)
Is there a way to use it for R15 characters, to have the entire body parts of a R15 character (LeftHand, LeftUpperArm, etc) ?

No problem :slightly_smiling_face:.
Here’s a code example:

local char --Imagine I got the character here
local hum = char:WaitForChild("Humanoid")
local desc = hum:GetAppliedDescription() --Get the current description
local clone = desc:Clone() --Clone the current description
clone.Head = 000000 --Your bundle/mesh ids
clone.Torso = 000000
clone.LeftArm = 0000000
clone.RightArm = 0000000
clone.LeftLeg = 000000
clone.RightLeg = 00000
hum:ApplyDescription(clone) --Apply the new description

HumanoidDescription should automatically do that, try it and post what the results are.

Just make sure to mark it as the solution if it worked for you :wink:

3 Likes

Alright, I will use this, thank you !

1 Like

It doesn’t seem to work, but I think I did something wrong :confused:

Here is the script :

game.Players.PlayerAdded:Connect(function(Player)
	Player.CharacterAdded:Connect(function(char)
		local hum = char:WaitForChild("Humanoid")
		local desc = hum:GetAppliedDescription() --Get the current description
		local clone = desc:Clone() --Clone the current description
		clone.Head = 000000
		clone.UpperTorso = 4915542510
		clone.LowerTorso = 4915542414
		
		clone.LeftUpperArm = 5878593702
		clone.LeftLowerArm = 5878593704
		clone.RightUpperArm = 5878685124
		clone.RightLowerArm = 5878685126
		
		clone.RightHand = 4915542334
		clone.LeftHand = 4915542334
		
		clone.RightUpperLeg = 5878685124
		clone.LeftUpperLeg = 5878593720
		clone.RightLowerLeg = 5878685121
		clone.LeftLowerLeg = 5878593706
		
		clone.LeftFoot = 4915542334
		clone.RightFoot = 4915542334

		hum:ApplyDescription(clone)
	end)
end)

Use the R6 Body parts’ names. The HumanoidDescription should automaticly convert them to R15.

For example: Torso = UpperTorso.
Your smooth character is basically smooth bricks right? So it should be able to do that.

But every body parts of the dummy have different IDs, how can I do ?

Try to use the main ones, for example:
UpperTorso → Torso
RightUpperArm → RightArm
You also don’t have to include every body part.
Don’t include the head if you don’t need it.
I don’t think it’ll be much of a problem, try that and show what happens.
Edit:

@BloodAlibi I will try the script myself and tell you what the results are. Will be back in a few minutes.

1 Like

I have tried with the R6 parts, here is the script :

game.Players.PlayerAdded:Connect(function(Player)
	Player.CharacterAdded:Connect(function(char)
		local hum = char:WaitForChild("Humanoid")
		local desc = hum:GetAppliedDescription() --Get the current description
		local clone = desc:Clone() --Clone the current description
		clone.Torso = 4915542510
		clone.LeftArm = 5878593702
		clone.RightArm = 5878593702
		clone.RightLeg = 5878685124
		clone.LeftLeg = 5878593720
		hum:ApplyDescription(clone)
	end)
end)

Bu nothing changes, my character is still with standard body parts
I have looked in my Character > Humanoid Description and the IDs are not here, I just see multiple “0”.

After testing a bit, it seems like there a ridiculous requirement here. You must use different mesh ids for every BodyPart:


I am also not too sure if it works with meshes (I only used it with bundles, but I think it works the same), try to make different meshes for the body parts just like you did with the legs.

The thing is that every parts have different IDs, here is the model of the dummy I use :
https://www.roblox.com/library/6687347695/Dummy
It seems impossible to use only one ID for an entire body part.
It works with different meshes for the joints :
image

To be honest, I have no idea. I used HumanoidDescription in the past, but only with Roblox Bundles. I can give you the script I used, maybe you’ll manage to figure it out.
Would you like me to do that?

In this forum, we need to make our own scripts, so you shouldn’t maybe.

Here is an example video of someone who used it :

https://streamable.com/g7p9m5

^
I don’t really know if he used these meshes, maybe he used another system.

Seems like they used a StarterCharacter, as this is not your avatar.
I have another idea then:
You can make a StarterCharacter with your smooth body parts,
and use Players:GetHumanoidDescriptionFromUserId(userId) to load the clothing and accessories of the player.
You have the clothing and accessories as properties in the HumanoidDescription.
You can use InsertService:LoadAsset(assetId) to load the accessories and clothing

It’s basically the opposite of what we tried to do until now.

Instead of loading the body parts on the character with clothing, load the clothing and accessories on the character with the body parts.

That’s true.

This way seems more complicated, but since we can’t manage to load the body parts, maybe it is preferred. Unless someone else has a solution to offer.

Yes, because it is pretty much self-explanatory. You basically put the userId of the player in the brackets and get the HumanoidDescription instance in return.

1 Like

I will try to use this, but is the page of the ROBLOX Reference working ? It seems too much empty.

1 Like

image

Looks like this character is not working very well.
I have added a Humanoid into the original dummy and renamed it StarterCharacter. I put it into StarterPlayer.

image

The body parts have CanTouch and Archivable on.

Is there anything wrong with this model ? Or did I do something wrong again.

Maybe try to copy your character, remove accessories and manually replace the Ids. Because you need all of the attachments to be set correctly.

image

I give up.
I think I will use standard joints and meshes.

Thank you LightningLion58 for your precious help.

2 Likes