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: Ghost effect script help

Previous Thread :: Next Thread 
ExcelarateX is not online. ExcelarateX
Joined: 22 Jun 2011
Total Posts: 444
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
Prehistoricman is not online. Prehistoricman
Joined: 20 Sep 2008
Total Posts: 12490
10 Apr 2013 10:34 AM
The error message is actually important, you know...
Report Abuse
BaconSoap is not online. BaconSoap
Joined: 12 Sep 2010
Total Posts: 1882
10 Apr 2013 10:34 AM
Try capitalizing parent after 'X = script.'
Report Abuse
ExcelarateX is not online. ExcelarateX
Joined: 22 Jun 2011
Total Posts: 444
10 Apr 2013 10:36 AM
nope don't work :l
Report Abuse
ExcelarateX is not online. ExcelarateX
Joined: 22 Jun 2011
Total Posts: 444
10 Apr 2013 10:37 AM
NVM it worked thanks :)

~Ex
Report Abuse
dop5k5 is not online. 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 is not online. 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
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
10 Apr 2013 10:38 AM
@dop5k5: Not to mention

"X.Transparency = 1
if X.Transparency == 1 then"

...
Report Abuse
As8D is not online. 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 is not online. 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 is not online. 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
Prehistoricman is not online. Prehistoricman
Joined: 20 Sep 2008
Total Posts: 12490
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
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
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
ExcelarateX is not online. ExcelarateX
Joined: 22 Jun 2011
Total Posts: 444
10 Apr 2013 10:45 AM
@dopk

100MillionMillion not billion lol

~Ex
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