✓ Accepted answer
You can use TweenSize to translate a gui between two sizes in a given time period:
local startSize = UDim2.new(0,100,0,100)
local endSize = UDim2.new(0,150,0,150)
local tweenTime = 1
script.Parent.Size = startSize
while true do
script.Parent:TweenSize(endSize, Enum.EasingDirection.Out,Enum.EasingStyle.Quad, tweenTime)
wait(tweenTime)
script.Parent:TweenSize(startSize, Enum.EasingDirection.Out,Enum.EasingStyle.Quad, tweenTime)
wait(tweenTime)
end
You can also edit the EasingDirection and the EasingStyle to customise this transition.
However, if you just wanted an instant transition between the sizes, you could just do something like this:
local startSize = UDim2.new(0,100,0,100)
local endSize = UDim2.new(0,150,0,150)
local waitTime = 1
while true do
script.Parent.Size = startSize
wait(waitTime)
script.Parent.Size = endSize
wait(waitTime)
end