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 » Scripting Helpers
Home Search
 

Re: Gui issue

Previous Thread :: Next Thread 
jknite is not online. jknite
Joined: 30 Nov 2007
Total Posts: 614
29 Sep 2012 05:09 PM
I am creating a GUI that is going to expand, then condense. Then bring a text in and out. I need help with the functions though. The current ones I have in (repeat until) wont stop the GUI from expanding. I have tried a for loop but failed. Please assist. If you help fix this issue, I will give you credit unto my game. It's almost finished.
(First expanding, other 5-6 movements are repetitive to the first one and would waste your time and your effort)



Logo = script.Parent.Logo
Creator = script.Parent.Creator
change1 = UDim2.new(0.01, 0, 0.01, 0)
change2 = UDim2.new(0.1, 0, 0.1, 0)

Logo.Position = UDim2.new(1, 0, 1, 0)
Logo.Size = UDim2.new(0, 0, 0, 0)
Creator.Position = UDim2.new(1, 0, 0.5, 0)
Creator.TextTransparency = 1
print("GUI set")

Logo.Visible = true
Creator.Visible = false

print("Logo in")
repeat
Logo.Size = Logo.Size + change1
Logo.Position = Logo.Position - change1
wait(0.05)
until Logo.Size == UDim2.new(1, 0, 1, 0)and Logo.Position == UDim2.new(0, 0, 0, 0)

print("Waiting 1 second")
wait(1)



--Thanks,
---Jknite
Report Abuse
eJorge is not online. eJorge
Joined: 09 Jun 2011
Total Posts: 5966
29 Sep 2012 05:12 PM
I recommend using this instead:
http://wiki.roblox.com/index.php/TweenSize_(Method)

It's very useful. There's also TweenPosition and TweenSizeAndPosition.

Read this first if you have never used tweening before:
http://wiki.roblox.com/index.php/Tweening
Report Abuse
jknite is not online. jknite
Joined: 30 Nov 2007
Total Posts: 614
29 Sep 2012 05:14 PM
Thanks, I was looking into tweening, but I couldn't figure out how to work it easily. First attempt failed for me.
Report Abuse
jknite is not online. jknite
Joined: 30 Nov 2007
Total Posts: 614
29 Sep 2012 05:30 PM
I am having a problem, my current one doesnt work at all... It skips moving in.

script.Parent:TweenSizeAndPosition(UDim2.new(1, 0, 1, 0), UDim2.new(0, 0, 0, 0), "In", "Linear", 6)
Report Abuse
jknite is not online. jknite
Joined: 30 Nov 2007
Total Posts: 614
29 Sep 2012 06:00 PM
Please assist.
Report Abuse
crusada91 is not online. crusada91
Joined: 04 Sep 2010
Total Posts: 684
29 Sep 2012 06:02 PM
for i = 1, 200 do
size = size + UDim2.new(x, ym z)
wait()
end
Report Abuse
jknite is not online. jknite
Joined: 30 Nov 2007
Total Posts: 614
29 Sep 2012 06:09 PM
there are way too many errors in that post... >.>
Report Abuse
eJorge is not online. eJorge
Joined: 09 Jun 2011
Total Posts: 5966
30 Sep 2012 02:31 AM
You only need one UDim2 value (the end position).
Report Abuse
ElectricBlazeAlt is not online. ElectricBlazeAlt
Joined: 17 Aug 2012
Total Posts: 3535
30 Sep 2012 02:35 AM
@eJorge - No, he was using TweenSizeAndPosition - he needs one for size and one for positi n
Report Abuse
luke111000 is not online. luke111000
Joined: 26 Apr 2009
Total Posts: 1853
30 Sep 2012 02:41 AM
script.Parent.Example:TweenSize(UDim2.new(1,0,1,0),"In","Linear",.5,false,nil)

I personally think it runs smoother with a nil on the end... But that could just be me.

-- Live young. Enjoy life. --
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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