Humanoid scaling not working

Hello. I am trying to make a morph which is bigger than a normal player.
I’ve made some code to do so using the values in HumanoidDiscription.

However, when I get morphed, the scale stays the same.

There aren’t any errors in the output.

code:

local part = script.Parent
local morph = game:GetService("ServerStorage"):WaitForChild("Morphs").EvilMegaRobot
local lasers = game:GetService("ReplicatedStorage"):WaitForChild("Lasers")
local debounce = false
local badgeId = 2128826434
local badgeService = game:GetService("BadgeService")

part.Touched:Connect(function(obj)
	if obj ~= nil and obj.Parent:FindFirstChild("Humanoid") ~= nil and game:GetService("Players"):FindFirstChild(obj.Parent.Name) ~= nil and debounce == false then debounce = true
		
		local plr = game:GetService("Players"):GetPlayerFromCharacter(obj.Parent)
		local Humanoid = obj.Parent:FindFirstChild("Humanoid")
		
		local HS = Humanoid.HumanoidDescription.HeadScale
		local BDS = Humanoid.HumanoidDescription.DepthScale
		local BWS = Humanoid.HumanoidDescription.WidthScale
		local BHS = Humanoid.HumanoidDescription.HeightScale
		print("changed scale")

		local morphClone = morph:Clone()
		morphClone.Name = "StarterCharacter"
		morphClone.Parent = game:GetService("StarterPlayer")
		local lastCharacterPos = plr.Character:WaitForChild("HumanoidRootPart").Position
		
		plr:LoadCharacter()
		
		HS *= 2
		BDS *= 2
		BWS *= 2
		
		BHS *= 2
		
		badgeService:AwardBadge(plr.UserId, badgeId)
		
		morphClone:Destroy()
		local lasersClone = lasers:Clone()
		lasersClone.Parent = plr:WaitForChild("Backpack")
		
		plr.Character:WaitForChild("HumanoidRootPart").Position = lastCharacterPos
		plr.Character.Humanoid.WalkSpeed = 32
		
		wait(10)
		part.TouchEnded:Connect(function()
			debounce = false
		end)
	end
end)

Please help if you can!

1 Like

Is Humanoid.AutomaticScalingEnabled set to true? Try setting it to true/false and see if that helps.

1 Like

That didn’t impact it.

Charsss

1 Like

oops, didn’t notice at first
you’re changing the humanoid description properties but you’re never applying them
also you can’t overwrite properties by assigning a variable to them and overwriting that variable later
I’m not very good at theory lol so here’s whats wrong

local HS = Humanoid.HumanoidDescription.HeadScale
local BDS = Humanoid.HumanoidDescription.DepthScale
local BWS = Humanoid.HumanoidDescription.WidthScale
local BHS = Humanoid.HumanoidDescription.HeightScale
HS *= 2 -- < this will only affect the "HS" variable, it will not overwrite the humanoid description's property
BDS *= 2
BWS *= 2 
BHS *= 2

here’s the fixed version:

local part = script.Parent
local morph = game:GetService("ServerStorage"):WaitForChild("Morphs").EvilMegaRobot
local lasers = game:GetService("ReplicatedStorage"):WaitForChild("Lasers")
local debounce = false
local badgeId = 2128826434
local badgeService = game:GetService("BadgeService")

part.Touched:Connect(function(obj)
	if obj ~= nil and obj.Parent:FindFirstChild("Humanoid") ~= nil and game:GetService("Players"):FindFirstChild(obj.Parent.Name) ~= nil and debounce == false then debounce = true
		
		local plr = game:GetService("Players"):GetPlayerFromCharacter(obj.Parent)
		local Humanoid = obj.Parent:FindFirstChild("Humanoid")

		local morphClone = morph:Clone()
		morphClone.Name = "StarterCharacter"
		morphClone.Parent = game:GetService("StarterPlayer")
		local lastCharacterPos = plr.Character:WaitForChild("HumanoidRootPart").Position
		
		plr:LoadCharacter()
		
		Humanoid.HumanoidDescription.HeadScale *= 2
		Humanoid.HumanoidDescription.DepthScale *= 2
		Humanoid.HumanoidDescription.WidthScale *= 2
		Humanoid.HumanoidDescription.HeightScale *= 2

		Humanoid:ApplyDescription(Humanoid.HumanoidDescription); -- we're done editing the description so now we can apply it
		
		badgeService:AwardBadge(plr.UserId, badgeId)
		
		morphClone:Destroy()
		local lasersClone = lasers:Clone()
		lasersClone.Parent = plr:WaitForChild("Backpack")
		
		plr.Character:WaitForChild("HumanoidRootPart").Position = lastCharacterPos
		plr.Character.Humanoid.WalkSpeed = 32
		
		wait(10)
		part.TouchEnded:Connect(function()
			debounce = false
		end)
	end
end)

I’m getting the error “Humanod: :ApplyDescription() DataModel was not available”