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?

function Resize(Model, Scale)
    for k,v in next,Model:children() do
        if v:IsA'BasePart' then
            local Vcf = v.CFrame
            local _,_,_,c0,c1,c2,c3,c4,c5,c6,c7,c8 = Vcf:components()
            v.Size = v.Size * Scale
            v.CFrame = CFrame.new(Vcf.p * Scale) * CFrame.new(0, 0, 0, c0, c1, c2, c3, c4, c5, c6, c7, c8)
        end
    end
end

Resize(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