There's a trick that you can do to mimic the effect of a part's size changing in one direction. You can do the inverse of what you're doing on the size of the part onto the position of the part and it'll look like the part is being re-sized in one direction.
For example: If you're adding 1 on the part's Y size, subtract 1 from the part's Y position to gain the effect.
Also, you must have a wait() in your loop, otherwise ROBLOX will crash because the loop is running too many times. A simple trick to do this is while wait() do.
Your code should look something like this:
local part = workspace.part1
while wait() do
part.Size = part.Size + Vector3.new(0,1,0)
part.Position = part.Position - Vector3.new(0,1,0)
end
I hope my answer helped you. If it did, be sure to accept it.
2 comments
What if the part has been rotated by (0,-45,0)? How would I make it do this then?
Does it not work when you rotate the part?