|
| 08 Jul 2015 06:57 PM |
Right now, I'm trying to figure out how to make the Gui Frame size to grow smaller using the for loop, I've already got the Gui Frames' rotation down, here is the script right now:
local frame = script.Parent.Parent.PlayerGui.LoadingGui.LoadingFrame
function reduceFrameSize() --??????? how end
function rotationSpin() for i = 0, 720, 4 do wait() frame.Rotation = i end end
frame.Visible = true repeat wait(1) frame.TextLabel.Text = "Loading" wait(1) frame.TextLabel.Text = "Loading." wait(1) frame.TextLabel.Text = "Loading.." wait(1) frame.TextLabel.Text = "Loading..." until wait(1) frame.TextLabel.Text = "Game Loaded." wait(1) frame.TextLabel.Text = "Have fun!" wait(0.5) reduceFrameSize() -- The Function rotationSpin()
Mixtape Coming Out 2020! |
|
|
| Report Abuse |
|
|
|
| 08 Jul 2015 07:13 PM |
You would need to do:
for i = 1,100 do wait() frame.Size = UDim2.new(0,frame.Size.X.Offset-1,0,frame.Size.Y.Offset-1) end
This shrinks the frame by 1 pixel (both x and y) every wait() for 100 times. Edit this to your liking.
|
|
|
| Report Abuse |
|
|
|
| 08 Jul 2015 07:16 PM |
@Scriptonym Thanks, but my sizes aren't the same, The frames Absolute Size is 1239, 644 while the Size is {1,0}, {1, 0}, how would I do that?
Mixtape Coming Out 2020! |
|
|
| Report Abuse |
|
|
|
| 08 Jul 2015 07:20 PM |
If you are using {1,0},{1,0} as the size, you can change it to:
for i = 1,100 do wait() frame.Size = UDim2.new(frame.Size.X.Scale-.01,0,frame.Size.Y.Scale-.01,0) end |
|
|
| Report Abuse |
|
|
|
| 08 Jul 2015 07:24 PM |
Wait, how do you call both functions at the same time to where they both do it at the same time, because when I called them both at the same time it did the size, then the rotation?
Mixtape Coming Out 2020! |
|
|
| Report Abuse |
|
|
|
| 08 Jul 2015 07:31 PM |
You would do:
rotationSpin() reduceFrameSize()
If this doesnt do both at the same time you will need to combine both into one function.
Here is a function that rotates and resizes the frame until the frame's size is {0,0},{0,0}
function rotateAndResize() repeat frame.Rotation = frame.Rotation + 1 frame.Size = UDim2.new(frame.Size.X.Scale-.01,0,frame.Size.Y.Scale-.01,0) wait() until frame.Size.X.Scale <= 0 and frame.Size.Y.Scale <= 0 end |
|
|
| Report Abuse |
|
|
|
| 08 Jul 2015 07:42 PM |
Thanks alot man, I'll take it from here, I'll message you if I have any more problems involving this okay
Mixtape Coming Out 2020! |
|
|
| Report Abuse |
|
|
|
| 08 Jul 2015 07:46 PM |
| Okay, ill be glad to help if any more come up. |
|
|
| Report Abuse |
|
|