Try:
part = script.Parent;
while wait(0.1) do
if script.Parent.Size == Vector3.new(100, 10, 100) then
script.Parent.Size = Vector3.new(part.Size.x, part.Size.y - 0.1, part.Size.z);
end
if script.Parent.Size == Vector3.new(100, 9, 100) then
script.Parent.Size = Vector3.new(part.Size.x, part.Size.y + 0.1, part.Size.z);
end
end
Not sure if you can just set the individual values like:
part.Size.x = 30;
You're free to try though, might be easier.
Also, if you're trying to SHRINK your brick and then GROW it back up again, you need to use a for loop:
part = script.Parent;
while wait(0.1) do
for i = 10, 9, -.1 do
if script.Parent.Size == Vector3.new(100, 10, 100) then
script.Parent.Size = Vector3.new(part.Size.x, i, part.Size.z);
end
wait(.1);
end
for i = 9, .1, 1 do
if script.Parent.Size == Vector3.new(100, 9, 100) then
script.Parent.Size = Vector3.new(part.Size.x, i, part.Size.z);
end
wait(.1);
end
end
Hope this helps!