|
| 10 Apr 2013 10:32 AM |
for i=1,100000000000000 do X = script.parent end X.Transparency = 0.25 wait(1) X.Transparency = 0.50 wait(1) X.Transparency = 0.75 wait(1) X.Transparency = 1 if X.Transparency == 1 then wait(2) X.Transparency = 0.75 wait(1) X.Transparency = 0.50 wait(1) X.Transparency = 0.25 wait(1) X.Transparency = 0 end
Someone fix this script it keeps showing error in the output please tell me what i did wrong there out put isn't that clear enough for me.
~Ex |
|
|
| Report Abuse |
|
|
|
| 10 Apr 2013 10:34 AM |
| The error message is actually important, you know... |
|
|
| Report Abuse |
|
|
BaconSoap
|
  |
| Joined: 12 Sep 2010 |
| Total Posts: 1882 |
|
|
| 10 Apr 2013 10:34 AM |
| Try capitalizing parent after 'X = script.' |
|
|
| Report Abuse |
|
|
| |
|
|
| 10 Apr 2013 10:37 AM |
NVM it worked thanks :)
~Ex |
|
|
| Report Abuse |
|
|
dop5k5
|
  |
| Joined: 18 Mar 2013 |
| Total Posts: 42 |
|
|
| 10 Apr 2013 10:37 AM |
"for i=1,100000000000000 do X = script.parent end"
really clever indeed |
|
|
| Report Abuse |
|
|
As8D
|
  |
| Joined: 24 Dec 2009 |
| Total Posts: 2907 |
|
|
| 10 Apr 2013 10:37 AM |
Why the hell are you trying to kill your RAM by looping over a billion times? Your game will CRASH with such a giant loop without any waits, and just doing a simple thing.
Also, are you sure that the script's Parent is a BasePart (main class for Parts, CylinderParts, WedgeParts ect).
Try this code: ----------------------------------------------------------------------- local X = script.parent for t = 0.25, 1, 0.25 do -- start 0.25, end 1, interval 0.25 X.Transparency = t wait(1) end if X.Transparency == 1 then wait(2) for t = 0.75, 0, -0.25 do X.Transparency = t wait(1) end -----------------------------------------------------------------------
Also, try check out my Twitter for amazing screenshots and st00f:
https://twitter.com/RobloxAs
- As, loops can actually make your code shorter. Amazing, right? |
|
|
| Report Abuse |
|
|
|
| 10 Apr 2013 10:38 AM |
@dop5k5: Not to mention
"X.Transparency = 1 if X.Transparency == 1 then"
... |
|
|
| Report Abuse |
|
|
As8D
|
  |
| Joined: 24 Dec 2009 |
| Total Posts: 2907 |
|
|
| 10 Apr 2013 10:38 AM |
Woops yeah, .Parent, not .parent ^ I use a lot of time writing posts.
- As, you want to go to this page; https://twitter.com/RobloxAs |
|
|
| Report Abuse |
|
|
dop5k5
|
  |
| Joined: 18 Mar 2013 |
| Total Posts: 42 |
|
|
| 10 Apr 2013 10:39 AM |
>kill your RAM by looping over a billion times? >RAM >looping
it doesn't use more memory because it doesn't need any allocations (that last after the loop) for each cycle, except for the global X |
|
|
| Report Abuse |
|
|
As8D
|
  |
| Joined: 24 Dec 2009 |
| Total Posts: 2907 |
|
|
| 10 Apr 2013 10:41 AM |
Ok, maybe X = math.random(1000) would lag then? J:
https://twitter.com/RobloxAs
- As, we use a local tag. It's faster. |
|
|
| Report Abuse |
|
|
|
| 10 Apr 2013 10:42 AM |
| Doing it that many times will hang the program for a long time (unless Roblox detects it). |
|
|
| Report Abuse |
|
|
|
| 10 Apr 2013 10:43 AM |
| Technically everything lags, its just that most processes take so little time that they don't cause noticeable lag (It probably only really lags when the processes take up over 1/60th of a second). |
|
|
| Report Abuse |
|
|
|
| 10 Apr 2013 10:45 AM |
@dopk
100MillionMillion not billion lol
~Ex |
|
|
| Report Abuse |
|
|