I want to make this so that it shrinks and stays in the middle. How can I do this? Here is what i have, but it shrinks to left top corner. Can you help me understand?
sb.SurfaceGui.container:TweenSizeAndPosition(UDim2.new(0,0,0,0), UDim2.new(0,0,0,0))
If you want to use TweenSizeAndPosition(), you'll need to know what it's parameters are. You can easily find them on the Roblox wiki here.
Essentially, the first argument is a UDim2 value that designates what you want the size the end up as, and the second argument is a UDim2 value that designates where you want the frame's position to move to. Thus, you can do something like this:
sb.SurfaceGui.container:TweenSizeAndPosition(UDim2.new(0,0,0,0), UDim2.new(0.5,0,0.5,0))
to keep the GUIObject in the center of your screen and have it shrink into nothing.
Hope this helps! -Poe