Need help with resizing models during runtime

I’m currently trying to make a game where over time where certain parts of a player’s model grow over time, and so far I’ve gotten it to a point when I resize it, it’ll resize everything relative to the player’s humanoid, but they don’t fully position correctly

function character:AdjustSize(size)
	for part, base_size in pairs(self.base_sizes) do
		if (self[part]) then
			local center = self.torso.CFrame:ToWorldSpace(self.base_rootpos[part]).p --self[part].Position
			local dist = self[part].Position - center
			
			self[part].Size = base_size * size
			
			--self.welds[part].Enabled = false
			
			self[part].CFrame = CFrame.new(dist * size + center) * (self[part].CFrame - self[part].Position)
			
			--[[local abc = self.torso.CFrame:ToWorldSpace(self.base_rootpos[part] * CFrame.new(size, size, size))
			print(part, "\nOriginal", self.base_rootpos[part], "\nMultiplied", abc)
			self[part].CFrame = abc
			self[part].Anchored = true]]
			--self.welds[part].Enabled = true
		end
	end
end

Starts as

And when I resize it, it ends up as

1 Like

You will need to increase the welds position with a factor as well like this R6 rig rescaler.

--replace motors with the table of welds
--Percent is decimal percentage
		for i,v in pairs(Motors) do
			v.C0 = CFrame.new((v.C0.Position * Percent)) * (v.C0 - v.C0.Position)
			v.C1 = CFrame.new((v.C1.Position * Percent)) * (v.C1 - v.C1.Position)
		end
1 Like

I’m not trying to rescale the player’s rig, im only trying to rescale parts on the player, but not the entire actual player

1 Like