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 |
|
|
|
| 28 Sep 2011 03:47 PM |
Try this.
for i = 0,10,0.1 do wait(.1) select.Test1.BackgroundTransparency = i end |
|
|
| Report Abuse |
|
|
|
| 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
|
  |
| 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
|
  |
| Joined: 07 Oct 2009 |
| Total Posts: 6568 |
|
| |
|
|
| 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
|
  |
| 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 |
|
|