generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Gui Frame Size Help

Previous Thread :: Next Thread 
DopeMixtape is not online. DopeMixtape
Joined: 05 Jan 2015
Total Posts: 381
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
Scriptonym is not online. Scriptonym
Joined: 29 Jun 2015
Total Posts: 135
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
DopeMixtape is not online. DopeMixtape
Joined: 05 Jan 2015
Total Posts: 381
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
Scriptonym is not online. Scriptonym
Joined: 29 Jun 2015
Total Posts: 135
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
DopeMixtape is not online. DopeMixtape
Joined: 05 Jan 2015
Total Posts: 381
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
Scriptonym is not online. Scriptonym
Joined: 29 Jun 2015
Total Posts: 135
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
DopeMixtape is not online. DopeMixtape
Joined: 05 Jan 2015
Total Posts: 381
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
Scriptonym is not online. Scriptonym
Joined: 29 Jun 2015
Total Posts: 135
08 Jul 2015 07:46 PM
Okay, ill be glad to help if any more come up.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image