How to cover up all peeks of the sky/baseplate when resizing gui?

What are you attempting to achieve? (Keep it simple and clear)
When Shrinking a frame with an achor point of 0,0 to the top corner of the screen, if i have another gui(s) move to the vacant spots that happens when shrinking, the bottom right corner piece should work like the others, obfuscating the baseplate and everything. It doesnt, although.
What is the issue? (Keep it simple and clear - Include screenshots/videos/GIFs if possible)

The bottom corner, for a brief second shows the baseplate/sky
What solutions have you tried so far? (Have you searched for solutions through the Roblox Wiki yet?)
Just resizing it, heres a snip it of my code:

gui.BF.Size= UDim2.new(1,0,1,0)
gui.Missions.Size= UDim2.new(0,0,0.75,0)
gui.Missions.Position= UDim2.new(1,0,0,0)
gui.Thoughts.Size= UDim2.new(0.75,0,0,0)
gui.Thoughts.Position= UDim2.new(0,0,1,0)
gui.Stats.Size= UDim2.new(0,0,0,0)
gui.Stats.Position= UDim2.new(1,0,1,0)
--... Other Functions here(not apart of question)
gui.BF:TweenSize(UDim2.new(.75,0,.75,0),Enum.EasingDirection.Out,0,1)
gui.Missions:TweenSizeAndPosition(UDim2.new(.25,0,.75,0),UDim2.new(.75,0,0,0),"Out",0,1)
gui.Thoughts:TweenSizeAndPosition(UDim2.new(.75,0,.25,0),UDim2.new(0,0,.75,0),"Out",0,1)
gui.Stats:TweenSizeAndPosition(UDim2.new(.25,0,.25,0),UDim2.new(.75,0,.75,0),"Out",0,1)

All gui elements are at anchor point 0,0.

Sorry if this has a really easy answer, but ive tried everything… but apparently not this:

What I did was make two “dummy” Frames that are placed where the corner would be. After doing so, i have one be the x axis for the frame, while the other being moved on the y axis. When doing so, nothing gets seen as the are both moving at the same time.
Heres the code now for any others looking for something similar.

gui.BF.Size= UDim2.new(1,0,1,0)
gui.Missions.Size= UDim2.new(0,0,0.75,0)
gui.Missions.Position= UDim2.new(1,0,0,0)
gui.Thoughts.Size= UDim2.new(0.75,0,0,0)
gui.Thoughts.Position= UDim2.new(0,0,1,0)
gui.Stats.Visible=false
for _,v in pairs(gui.StatsCombine:GetChildren()) do
    v.BackgroundColor3= gui.Stats.BackgroundColor3
end
gui.StatsCombine.Stat.Position= UDim2.new(1,0,.75,0)
gui.StatsCombine.Stats.Position= UDim2.new(.75,0,1,0)
--... Yielding code that doesn't add to the answer.
gui.BF:TweenSize(UDim2.new(.75,0,.75,0),Enum.EasingDirection.Out,0,1)
gui.Missions:TweenSizeAndPosition(UDim2.new(.25,0,.75,0),UDim2.new(.75,0,0,0),"Out",0,1)
gui.Thoughts:TweenSizeAndPosition(UDim2.new(1,0,.75,0),UDim2.new(0,0,.75,0),"Out",0,1)
gui.StatsCombine.Stat:TweenPosition(UDim2.new(.75,0,.75,0),"Out",0,1)
gui.StatsCombine.Stats:TweenPosition(UDim2.new(.75,0,.75,0),"Out",0,1)
wait(1)
gui.Stats.Visible= true
gui.StatsCombine:Destroy()

This is a problem that I have faced, and I just made the gui Y scale 1.1 and then moved the gui up 0.1.

You could try have an Anchor Point of 0.5, 0.5 and position the GUI to the bottom right corner of the screen with a Size of UDim2.new(0, 0, 0, 0), then when you need to tween the Size resize the GUI to 2x the size it’s meant to be in parrallel of the other tween.

Perhaps you’d like to rethink your UI design? There isn’t a way you’re going to be able to “hide peeks of uncovered areas” with this current method. What is the purpose for you tweening the overlay and tweening another frame up to the corner?

The corner piece will be player stats. Like Health, Hunger, etc. Having it as a seperate frame would help make the process of making bars for these a little easier

Thanks, ill try this out, ill approve your answer if it worked!

Answered the question myself :confused:

1 Like