Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How would I resize this welded model?

function Resize(Model, Scale)
	for i, Part in ipairs(Model:GetChildren()) do
		if Part:IsA('BasePart') and Part ~= Model.Middle then
			local PartCFrame = Part.CFrame
			local Difference = (Part.Position - Model.Middle.Position) * Scale
			local X, Y, Z, R00, R01, R02, R10, R11, R12, R20, R21, R22 = PartCFrame:components()
			Part.Size = Part.Size * Scale
			Part.CFrame = CFrame.new(Model.Middle.Position + Difference) * CFrame.new(0, 0, 0, R00, R01, R02, R10, R11, R12, R20, R21, R22)
		end
	end
end

Resize(script.Parent, 2)

I have a model that is welded together and I want to resize it. I created this script but it only resizes it when it is anchored, since it breaks the welds if it isn't. I can't seem to make it work with welds. How could I edit it so that it changes the weld's C0/C1? Or is there a better way to make it work with welds?

1 answer

You can resize models now Make it into a model, then use your resize tool to resize it

1 comment

0

I know that, but I am trying to resize it in the game, not in studio...

This discussion is preserved as it was. New answers, comments, and votes are closed.