Sizing Models through script

I am adding onto a larvae system for my game. In this system the larvae is supposed to be fed (a player) and they will grow and be able to hatch. I am currently trying to make it so that the entire character model will increase in size (similar to how you can size a model in studio) I have been looking but haven’t been able to find a way to accomplish this, is there any built in function for this?

Try altering these values under the character’s Humanoid:

image

It’s a custom character so I’m not sure that’d work

CrazyMan32 had a topic on this, with this code:

local function ScaleModel(model, scale)
	
	local primary = model.PrimaryPart
	local primaryCf = primary.CFrame
	
	for _,v in pairs(model:GetDescendants()) do
		if (v:IsA("BasePart")) then
			v.Size = (v.Size * scale)
			if (v ~= primary) then
				v.CFrame = (primaryCf + (primaryCf:inverse() * v.Position * scale))
			end
		end
	end
	
	return model
	
end