Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do you add a automatic Gui-screensize adjuster to this script?

Please don't redirect me to the Wiki regarding automatic Sizing, I don't under it very well...

So how would I put a screen Adjuster in this script? Or is there a different way I have to do it by another script?

local Shade = script.Parent.Shade -- Fade
local Frame1 = script.Parent.Frame1
local Frame2 = script.Parent.Frame2
local Frame3 = script.Parent.Frame3
local Textbox = script.Parent.TextBox
local Image = script.Parent.ImageLabel

wait(2)
for i=1,10 do
	wait(0.01)
Shade.BackgroundTransparency = Shade.BackgroundTransparency + 0.1

Frame1.BackgroundTransparency = Frame1.BackgroundTransparency + 0.1

	Frame2.BackgroundTransparency = Frame2.BackgroundTransparency + 0.1

	Frame3.BackgroundTransparency = Frame3.BackgroundTransparency + 0.1

	Textbox.TextTransparency = Textbox.TextTransparency + 0.1

	Image.ImageTransparency = Image.ImageTransparency + 0.1
end
if Shade.BackgroundTransparency == 10 then
	--Puttting Destroy parent here..--
end

1 answer

✓ Accepted answer

To resize a GUI you gotta use the TweenSize() method. Here is an example:

script.Parent.Frame:TweenSize(Udim2.new(Ending Position Here), "Out", "Quart", 0.5, false)

0.5 is the speed, and the other Arguments make it move smoothly. Also when you copy and paste the UDim2 you want to end at(if you copy and paste it) remove the "{}" brackets.

2 comments

0

What does out and Quart mean exactly though?

This discussion is preserved as it was. New answers, comments, and votes are closed.