I’ve been met with a problem when using HumanoidDescription to change your ROBLOX character’s package every time when you join a game. You see, it works however it also changes the character’s scaling to default which was not asked for. Now you look fat. The game settings for scaling is not the cause of this either, and I cannot find a solution for this.
Script:
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
while not character.Parent do
character.AncestryChanged:Wait()
end
local humanoid = character:WaitForChild("Humanoid", 5)
if humanoid then
while wait() do
local descriptionClone = humanoid:GetAppliedDescription()
descriptionClone.Head = 0
descriptionClone.LeftArm = 0
descriptionClone.LeftLeg = 0
descriptionClone.RightArm = 0
descriptionClone.RightLeg = 0
if character.UpperTorso.MeshId~="http://www.roblox.com/asset/?id=542765884" then
descriptionClone.Torso = 0
end
humanoid:ApplyDescription(descriptionClone)
end
end
end)
end)
You can attempt to set the scaling back to its original scale before the package change using the following code: (Commented MY EDITS:)
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
while not character.Parent do
character.AncestryChanged:Wait()
end
local humanoid = character:WaitForChild("Humanoid", 5)
if humanoid then
-- MY EDITS (Sorry for the bad indents it doesn't allow me to do it on this editor)
local BodyDepthScale = humanoid:WaitForChild("BodyDepthScale").Value
local BodyHeightScale = humanoid:WaitForChild("BodyHeightScale").Value
local BodyWidthScale = humanoid:WaitForChild("BodyWidthScale").Value
local BodyHeadScale = humanoid:WaitForChild("BodyHeadScale").Value
while wait() do
local descriptionClone = humanoid:GetAppliedDescription()
descriptionClone.Head = 0
descriptionClone.LeftArm = 0
descriptionClone.LeftLeg = 0
descriptionClone.RightArm = 0
descriptionClone.RightLeg = 0
if character.UpperTorso.MeshId~="http://www.roblox.com/asset/?id=542765884" then
descriptionClone.Torso = 0
end
humanoid:ApplyDescription(descriptionClone)
end
-- MY EDITS:
humanoid.BodyDepthScale.Value = BodyDepthScale
humanoid.BodyHeightScale.Value = BodyHeightScale
humanoid.BodyWidthScale.Value = BodyWidthScale
humanoid.BodyHeadScale.Value = BodyHeadScale
end
end)
end)
I typed these edits in the DevForum editor so they may have a syntax error or two and I didn’t test this, just reply back if it doesn’t work with the error.