✓ Accepted answer
Well, I am not sure what's the right way to do it, but here is what came first to my mind:
You can store previous CFrame and then bring the Part back to it.
Though, when resizing, it will still move because if you resize only 1 side, CFrame will center it again, making it move by half of the Vector3 difference between start and end Size.
To correct this, you can subtract half of that Vector3 from the starting CFrame.
local prevPos = Part.CFrame
Part.Size = Part.Size + Vector3.new(0, -1, 0)
Part.CFrame = prevPos - Vector3.new(0, -0.5, 0)
I am not sure if that is what you wanted, so make sure to comment if you need any more help.
Edit
I just realized that this is almost certainly not what you wanted.
What the above code does, is it moves the Part away from the face that is being resized (which might be useful for some occasions), so you can keep the parts connected at that face.
What I think you really want to do is just make the Part go inside the other Part.
To do this, just change the Vector3 subtraction to addition:
local prevPos = Part.CFrame
Part.Size = Part.Size + Vector3.new(0, -1, 0)
Part.CFrame = prevPos + Vector3.new(0, -0.5, 0)
2 comments
This is actually useful! unfortunately, I tried and it didn't work :l
I see a problem, When you use "Part.Size" it does not know the rest of the pattern, it could be game.ServerStorage.Part.Size or workspace.Part