Why doesn't my head scale?

player.Character:WaitForChild"Humanoid":WaitForChild"BodyDepthScale".Value *= 3
	player.Character:WaitForChild"Humanoid":WaitForChild"BodyHeightScale".Value *= 3.2
	player.Character:WaitForChild"Humanoid":WaitForChild"BodyWidthScale".Value *= 3
	player.Character:WaitForChild"Humanoid":WaitForChild"HeadScale".Value *= 3
	player.Character:WaitForChild"Humanoid":WaitForChild"BodyProportionScale".Value *= 3

the player scales, but the head doesn’t. How do I scale it?

Hi there.

Offtopic, but.

I am the bad code police, and I’m here to help.

Lemme give you an example of some nicer looking code.

local Character = Player.Character
local Humanoid = Character:WaitForChild("Humanoid")

Humanoid:WaitForChild("BodyDepthScale").Value *= 3
Humanoid:WaitForChild("BodyHeightScale").Value *= 3.2
Humanoid:WaitForChild("BodyWidthScale").Value *= 3
Humanoid:WaitForChild("HeadScale").Value *= 3
Humanoid:WaitForChild("BodyProportionScale").Value *= 3

Oh would you look at that, isn’t that much cleaner? It’d be even better if you did a for loop

local Character = Player.Character
local Humanoid = Character:WaitForChild("Humanoid")

for i,v in pairs(Humanoid:GetChildren()) do
   if v:IsA("IntValue") then
      v.Value *= 3
   end
end

Anywho. Till we meet again.

2 Likes

I mean it functions the same and I don’t really care about the code looking good because it looks really messy already thanks to the previous developer

You’ll need to use a humanoid description for this. What you’ll need to do is get the player’s humanoid description, then set the values, then apply the description like so:

game.Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(character)
		local HumanoidDescription = character.Humananoid:GetAppliedDescription()
		
		HumanoidDescription:WaitForChild("BodyDepthScale").Value *= 3
		HumanoidDescription:WaitForChild("BodyHeightScale").Value *= 3.2
		HumanoidDescription:WaitForChild("BodyWidthScale").Value *= 3
		HumanoidDescription:WaitForChild("HeadScale").Value *= 3
		HumanoidDescription:WaitForChild("BodyProportionScale").Value *= 3
		
		character.Humanoid:ApplyDescription(HumanoidDescription)
	end)
end)
1 Like