What you are referring to is Tweening. It lets you change the size, position, or both at the same time. It allows you to have an end and start position that has a "sliding" feature to it. The syntax for TweenSize is, gui:TweenSize( UDim2 endSize, Enum easingDirection = Out, Enum easingStyle = Quad, float time = 1, bool override = false, function callback = nil )
Let me explain what each of these things do,
The end size is the size you want to expand to.
The easing direction is the "way it slides". For example, "In" would make it slow down as it comes in.
The easing style is the way it expands there, or "the way in which the tweening will act". For example, a "Linear" easing style would remain constant; however, a "Sine" tweening style will "gradually slow down" until the endpoint is reached.
The float time is how long it will take to reach the end point (in seconds).
To make a "loading GUI" you would want to do something similar to this,
gui:TweenSize(UDim2.new(0, 100, 0, 0), "Out", "Linear", 2, false)
If the start size was (0, 0, 0, 0) this would expand along the x-axis with an offset of 100 and would take two seconds to reach that size.
1 comment
Thanks, i made one and so far it's working fine with no bugs. Thanks again!