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

Changing the Size of a Part.

This may sound like a basic question but I need to know how to change the size of a part that is in the workspace.

local part = game.Worksace.Part1
while true do
--change size
wait()
end

I need to know the way to change the size.

3 answers

local part = game.Workspace.Part1
local delta = 1
while true do 
	part.Size = part.Size + Vector3.new(delta,delta,delta)
	wait()
end

Be careful! That's an infinite loop. You'll probably want a way to break out of it before the brick gets too large.

maybe while part.Size.X <= 200 do instead of while true do

Good luck!

Just to quickly add on to what AxeOfMe posted, when resizing parts you generally need to reposition the part to it's initial position (by changing it's new CFrame to its old CFrame) once the resizing has been done.

local part = game.Workspace.Part1
local oldcf = part.CFrame

while true do
	part.Size = part.Size + Vector3.new(1, 1, 1)
	part.CFrame = oldcf --reposition the part
	wait()
end
local part = game.Worksace.Part1;
for i=1,100 do
part.Size=Vector3.new(i,i,i);
wait();
end

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