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
We use cookies to offer you a better experience. By using Roblox.com, you are agreeing to our Privacy and Cookie Policy.
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Looping Gui Transparency

Previous Thread :: Next Thread 
Aeroh is not online. Aeroh
Joined: 24 Sep 2011
Total Posts: 50
28 Sep 2011 03:22 PM
for i = 0.1,1 do
wait(.1)
select.Test1.BackgroundTransparency = i
end

When I click the button that triggers this, it becomes only transparent. What would I do to make select.Test1.BackgroundTranspareny = i until the loop is done? (select = script.Parent.Parent)
Report Abuse
epicfail22 is not online. epicfail22
Joined: 25 Sep 2009
Total Posts: 3739
28 Sep 2011 03:47 PM
Try this.

for i = 0,10,0.1 do
wait(.1)
select.Test1.BackgroundTransparency = i
end
Report Abuse
epicfail22 is not online. epicfail22
Joined: 25 Sep 2009
Total Posts: 3739
28 Sep 2011 03:48 PM
It was because the [for i = 0.1,1 do] was going up by 1's so it automatically became transparent because the transparency was greater than 1. It should be


for i = 0(starting number),10(number of looping times),0.1(optinial increment to increase by) do
Report Abuse
awxsd561 is not online. awxsd561
Joined: 05 Jul 2009
Total Posts: 18
28 Sep 2011 03:55 PM
@epicfail
SILLY MISKTAKE
for i = 0.1,1,0.1
Report Abuse
Miro034 is not online. Miro034
Joined: 07 Oct 2009
Total Posts: 6568
28 Sep 2011 04:14 PM
^

xD
Report Abuse
epicfail22 is not online. epicfail22
Joined: 25 Sep 2009
Total Posts: 3739
28 Sep 2011 04:23 PM
Actually, wouldn't it need to be 10 so it would go like this?

StartingNum = 0.1
Times = 10
Increment = 0.1

for i = StartingNum,Times,Increment do
gui.BackgroundTransparency = i
print(i)
end

Will Result In:
0.1 --first time
0.2 --second time
0.3 --third time
0.4 --fourth time
0.5 --fifth time
0.6 --sixth time
0.7 --seventh time
0.8 --eighth time
0.9 --ninth time
1 --tenth time

Therefore needing 10 times in the loop, correct?
Report Abuse
Apocalyps is not online. Apocalyps
Joined: 15 Feb 2009
Total Posts: 816
28 Sep 2011 04:30 PM
Its,

for (starting number), (ending number), (optional increment, default is 1) do
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