Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How Would I Go About Resizing a Model Using a Script?

Asked by 5 years ago

I have tried to use something like this, but it doesn't seem to work. Any thoughts?

01function Resize(Model, Scale)
02    for k,v in next,Model:children() do
03        if v:IsA'BasePart' then
04            local Vcf = v.CFrame
05            local _,_,_,c0,c1,c2,c3,c4,c5,c6,c7,c8 = Vcf:components()
06            v.Size = v.Size * Scale
07            v.CFrame = CFrame.new(Vcf.p * Scale) * CFrame.new(0, 0, 0, c0, c1, c2, c3, c4, c5, c6, c7, c8)
08        end
09    end
10end
11 
12Resize(ring, Vector3.new(.5, 0, 0))

1 answer

Log in to vote
0
Answered by 5 years ago

I'd recommend reading this thread from Developer Forums: https://devforum.roblox.com/t/is-this-the-best-way-to-scale-a-model/166021.

Ad

Answer this question