Humanoid:ApplyDescription applies package, but not body scale

Hello,

So basically, I have a server script in ServerScriptService. What it is supposed to do is manipulate everyone’s humanoiddescription when they join to remove their package. But, what it also does is makes the scaling really fat, so to try to counteract this I made it so that it also makes the body scaling to the original body scaling, with some limitations. I have varied results. In some cases, my body becomes what it’s supposed to be, and in some other cases it just stays fat and sometimes shifts to what it’s supposed to be for a split second and returns to the fat scaling.

-- Stop automatic spawning so it can be done in the "PlayerAdded" callback
 
game.Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(character)
					local humanoid = character.Humanoid

			local BodyDepthScale = humanoid:WaitForChild("BodyDepthScale").Value
			local BodyHeightScale = humanoid:WaitForChild("BodyHeightScale").Value
			local BodyHeadScale = humanoid:WaitForChild("HeadScale").Value
			local BodyWidthScale = humanoid:WaitForChild("BodyWidthScale").Value
		while wait() do
			local humanoidDescription = character.Humanoid:GetAppliedDescription()
			humanoidDescription.Head = 0
			humanoidDescription.LeftArm = 0
			humanoidDescription.LeftLeg = 0
			humanoidDescription.RightArm = 0
			humanoidDescription.RightLeg = 0		
			if character.UpperTorso.MeshId~="http://www.roblox.com/asset/?id=542765884" then
				humanoidDescription.Torso = 0
			end
			print(tostring(BodyDepthScale))
			print(tostring(BodyHeadScale))
			print(tostring(BodyWidthScale))
			print(tostring(BodyHeightScale))
			humanoidDescription.HeadScale = BodyHeadScale
			humanoidDescription.HeightScale = BodyHeightScale
			humanoidDescription.WidthScale = BodyWidthScale
			humanoidDescription.DepthScale = BodyDepthScale
			repeat wait() until character.Parent==game.Workspace
			repeat character.Humanoid:ApplyDescription(humanoidDescription) until humanoid:WaitForChild("BodyWidthScale").Value<1
		end
	end)
end)

This returns no errors, and is undocumented, I searched for many answers and returned with none.

1 Like

Humanoid Descriptions have issues sometimes, it’s annoying

local Players = game:GetService("Players")


function playerAdded(Player)

	local function characterAdded(char)

		local humanoid = char:WaitForChild("Humanoid")
		local humanoidDescription = humanoid:GetAppliedDescription()
		humanoidDescription.Head = 0
		humanoidDescription.LeftArm = 0
		humanoidDescription.LeftLeg = 0
		humanoidDescription.RightArm = 0
		humanoidDescription.RightLeg = 0
		wait() -- (needed, if you don't then you will get a datamodel was not available error, which is probably a bug)
		humanoid:ApplyDescription(humanoidDescription)	
	end
	

	Player.CharacterAppearanceLoaded:Connect(characterAdded)
	
end

Players.PlayerAdded:Connect(playerAdded)

you weren’t waiting for the character’s appearance to load so that was the issue I believe, and you don’t need to store the scales and reload them if you use humanoid:GetAppliedDescription()

Quoteory,

I tried your script and it works, but the only problem is is that it doesn’t affect my character scale weirdly, it only changes my package.

Here is my script.

local Players = game:GetService("Players")


function playerAdded(Player)

	local function characterAdded(char)

		local humanoid = char:WaitForChild("Humanoid")
		local humanoidDescription = humanoid:GetAppliedDescription()
		local BodyDepthScale = humanoid:WaitForChild("BodyDepthScale").Value
		local BodyHeightScale = humanoid:WaitForChild("BodyHeightScale").Value
		local BodyHeadScale = humanoid:WaitForChild("HeadScale").Value
		local BodyWidthScale = humanoid:WaitForChild("BodyWidthScale").Value
		humanoidDescription.Head = 0
		humanoidDescription.LeftArm = 0
		humanoidDescription.LeftLeg = 0
		humanoidDescription.RightArm = 0
		humanoidDescription.RightLeg = 0
		humanoidDescription.HeadScale = BodyHeadScale
		humanoidDescription.HeightScale = BodyHeightScale
		humanoidDescription.WidthScale = BodyWidthScale
		humanoidDescription.DepthScale = BodyDepthScale
		print(tostring(BodyDepthScale))
		print(tostring(BodyHeadScale))
		print(tostring(BodyWidthScale))
		print(tostring(BodyHeightScale))
		wait() -- (needed, if you don't then you will get a datamodel was not available error, which is probably a bug)
		humanoid:ApplyDescription(humanoidDescription)	
	end
	

	Player.CharacterAppearanceLoaded:Connect(characterAdded)
	
end

Players.PlayerAdded:Connect(playerAdded)

-- asdasd
-- 
--game.Players.PlayerAdded:Connect(function(player)
--	player.CharacterAdded:Connect(function(character)
--					local humanoid = character.Humanoid
--
--			local BodyDepthScale = humanoid:WaitForChild("BodyDepthScale").Value
--			local BodyHeightScale = humanoid:WaitForChild("BodyHeightScale").Value
--			local BodyHeadScale = humanoid:WaitForChild("HeadScale").Value
--			local BodyWidthScale = humanoid:WaitForChild("BodyWidthScale").Value
--		while wait() do
--			local humanoidDescription = character.Humanoid:GetAppliedDescription()
--			humanoidDescription.Head = 0
--			humanoidDescription.LeftArm = 0
--			humanoidDescription.LeftLeg = 0
--			humanoidDescription.RightArm = 0
--			humanoidDescription.RightLeg = 0		
--			if character.UpperTorso.MeshId~="http://www.roblox.com/asset/?id=542765884" then
--				humanoidDescription.Torso = 0
--			end
--			print(tostring(BodyDepthScale))
--			print(tostring(BodyHeadScale))
--			print(tostring(BodyWidthScale))
--			print(tostring(BodyHeightScale))
--			humanoidDescription.HeadScale = BodyHeadScale
--			humanoidDescription.HeightScale = BodyHeightScale
--			humanoidDescription.WidthScale = BodyWidthScale
--			humanoidDescription.DepthScale = BodyDepthScale
--			repeat wait() until character.Parent==game.Workspace
--			repeat character.Humanoid:ApplyDescription(humanoidDescription) until humanoid:WaitForChild("BodyWidthScale").Value<1
--		end
--	end)
--end)

Edit:

I realized that you said humanoid:GetAppliedDescription would also apply the original scale, but this is not the case. When I ran your script it did not change my scale to what I’d like it to be, and when I added modifications in your script, it still also did not change my scale.

Quoteory,

So to add on to my previous post, I ran a few tests and there were peculiar results. First, even when I make my width 0, my character still seams to be the same fat as it is, and when I print the humanoid description for the width scale after it has already been applied the humanoiddescription, it returns 0. So apparently this does not match up with what I’m seeing.

Also, at times it does make my character skinny, I’d give it a 20% chance.

Script:

local Players = game:GetService("Players")


function playerAdded(Player)

	local function characterAdded(char)

		local humanoid = char:WaitForChild("Humanoid")
		local humanoidDescription = humanoid:GetAppliedDescription()
		local BodyDepthScale = humanoid:WaitForChild("BodyDepthScale").Value
		local BodyHeightScale = humanoid:WaitForChild("BodyHeightScale").Value
		local BodyHeadScale = humanoid:WaitForChild("HeadScale").Value
		local BodyWidthScale = humanoid:WaitForChild("BodyWidthScale").Value
		humanoidDescription.Head = 0
		humanoidDescription.LeftArm = 0
		humanoidDescription.LeftLeg = 0
		humanoidDescription.RightArm = 0
		humanoidDescription.RightLeg = 0
		if char.UpperTorso.MeshId~="http://www.roblox.com/asset/?id=542765884" then
			humanoidDescription.Torso = 0
		end
		humanoidDescription.HeadScale = BodyHeadScale
		humanoidDescription.HeightScale = BodyHeightScale
		humanoidDescription.WidthScale = BodyWidthScale/5
		humanoidDescription.DepthScale = BodyDepthScale
		print(tostring(BodyDepthScale))
		print(tostring(BodyHeadScale))
		print(tostring(BodyWidthScale))
		print(tostring(BodyHeightScale))
		wait() -- (needed, if you don't then you will get a datamodel was not available error, which is probably a bug)
		humanoid:ApplyDescription(humanoidDescription)
		print(tostring(humanoid.BodyWidthScale.Value))
	end
	

	Player.CharacterAppearanceLoaded:Connect(characterAdded)
	
end

Players.PlayerAdded:Connect(playerAdded)

-- asdasd
-- 
--game.Players.PlayerAdded:Connect(function(player)
--	player.CharacterAdded:Connect(function(character)
--					local humanoid = character.Humanoid
--
--			local BodyDepthScale = humanoid:WaitForChild("BodyDepthScale").Value
--			local BodyHeightScale = humanoid:WaitForChild("BodyHeightScale").Value
--			local BodyHeadScale = humanoid:WaitForChild("HeadScale").Value
--			local BodyWidthScale = humanoid:WaitForChild("BodyWidthScale").Value
--		while wait() do
--			local humanoidDescription = character.Humanoid:GetAppliedDescription()
--			humanoidDescription.Head = 0
--			humanoidDescription.LeftArm = 0
--			humanoidDescription.LeftLeg = 0
--			humanoidDescription.RightArm = 0
--			humanoidDescription.RightLeg = 0		
--			if character.UpperTorso.MeshId~="http://www.roblox.com/asset/?id=542765884" then
--				humanoidDescription.Torso = 0
--			end
--			print(tostring(BodyDepthScale))
--			print(tostring(BodyHeadScale))
--			print(tostring(BodyWidthScale))
--			print(tostring(BodyHeightScale))
--			humanoidDescription.HeadScale = BodyHeadScale
--			humanoidDescription.HeightScale = BodyHeightScale
--			humanoidDescription.WidthScale = BodyWidthScale
--			humanoidDescription.DepthScale = BodyDepthScale
--			repeat wait() until character.Parent==game.Workspace
--			repeat character.Humanoid:ApplyDescription(humanoidDescription) until humanoid:WaitForChild("BodyWidthScale").Value<1
--		end
--	end)
--end)

the issue is that you’re still using the scale code from your original script which doesn’t work

local BodyDepthScale = humanoid:WaitForChild("BodyDepthScale").Value
local BodyHeightScale = humanoid:WaitForChild("BodyHeightScale").Value
local BodyHeadScale = humanoid:WaitForChild("HeadScale").Value
local BodyWidthScale = humanoid:WaitForChild("BodyWidthScale").Value

don’t do this^

overall I’m really confused on what you want, I thought you just wanted the script to remove packages and that’s it (if you do nothing else the scale stays the same)

the script works I supplied works for me

As you can see, the video shows the script in action, clearly, your script does affect my character scale.

humanoidScript.rbxl (15.4 KB)
check if it still happens for you in this game

For me, in the file you sent me the script does not work at all, everything is unchanged.

I forgot to add the playeradded event mb

but yeah I’m not sure what’s going on it works for me

try adding the playeradded event in the place file I linked, and tell me if the issue is still happening ]

local Players = game:GetService("Players")


function playerAdded(Player)

	local function characterAdded(char)

		local humanoid = char:WaitForChild("Humanoid")
		local humanoidDescription = humanoid:GetAppliedDescription()
		humanoidDescription.Head = 0
		humanoidDescription.LeftArm = 0
		humanoidDescription.LeftLeg = 0
		humanoidDescription.RightArm = 0
		humanoidDescription.RightLeg = 0
		humanoidDescription.Torso = 0
		wait() -- (needed, if you don't then you will get a datamodel was not available error, which is probably a bug)
		humanoid:ApplyDescription(humanoidDescription)	
	end
	

	Player.CharacterAppearanceLoaded:Connect(characterAdded)
	
end

Players.PlayerAdded:Connect(playerAdded)

Quooteory,

I added the playeradded function and it removes the package as expected, however sometimes it makes my scaling fat, while at other times it does not.

When using ApplyDescription(), the character must not have any package, that is, being a block, it is logical to think that if you do it with the players, some may come with a package, so I think you would have to remove the package before using ApplyDescription, or use another method to get what you want.

the package removal works, it’s just the scale that is not loading correctly

@iSyriux
try adding some wait()s

local Players = game:GetService("Players")


function playerAdded(Player)
print("Player Added")
 
	local function characterAdded(char)

		print("Character Added")
		local humanoid = char:WaitForChild("Humanoid")
		wait()
		local humanoidDescription = humanoid:GetAppliedDescription()
		wait()
		humanoidDescription.Head = 0
		humanoidDescription.LeftArm = 0
		humanoidDescription.LeftLeg = 0
		humanoidDescription.RightArm = 0
		humanoidDescription.RightLeg = 0
		humanoidDescription.Torso = 0
		wait() -- (needed, if you don't then you will get a datamodel was not available error, which is probably a bug)
		humanoid:ApplyDescription(humanoidDescription)	
	end
	

	Player.CharacterAppearanceLoaded:Connect(characterAdded)
	
end

Players.PlayerAdded:Connect(playerAdded) 

this is likely the issue, but I hate having to use wait()s but humanoid descriptions…

Sadly, using wait()s or even wait(1)s don’t do anything. When the humanoid description is applied it is the same fat as before.

I tried printing the widthscale for the humanoid description, and guess what, it returned 0.69999998807907, which is the scale it’s supposed to be. But somehow, this scale is not applying to my character at all.

when this happens view your character serverside and localside and see if they look the same in game, an issue I had before is that the server was scaling properly but the client was not

via this image

this is what it looked like for me

scales are the same but the client didnt resize

That’s rather odd, is there any way I could make this show for both the client and server?

The method I used in my game to fix a similar issue with HumanoidDescriptions
(custom character loading)

local Players = game:GetService("Players")


function playerAdded(Player)
 
	local function spawnCharacter()

		local humanoidDescription = Players:GetHumanoidDescriptionFromUserId(Player.UserId)
		
		humanoidDescription.Head = 0
		humanoidDescription.LeftArm = 0
		humanoidDescription.LeftLeg = 0
		humanoidDescription.RightArm = 0
		humanoidDescription.RightLeg = 0
		humanoidDescription.Torso = 0

		Player:LoadCharacterWithHumanoidDescription(humanoidDescription)	
		
		local character = Player.Character
		local humanoid = character:WaitForChild("Humanoid")
		humanoid.Died:Connect(function()
			spawnCharacter()
		end)
		
	end
	
	spawnCharacter()
end

Players.PlayerAdded:Connect(playerAdded)

make sure to disable the character auto loads in Players if you use this method

1 Like