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: Am I using _G. right?

Previous Thread :: Next Thread 
mamaguy is not online. mamaguy
Joined: 07 Oct 2010
Total Posts: 7073
16 Jul 2012 05:16 PM
_G.Fog = (function fog1(end1)
l = game.Lighting
repeat
l.FogEnd = FogEnd +1
wait(0.5)
until l.FogEnd == end1
end)

So then in another script....:
a = math.random(100)
_G.Fog(a)
Correct way? :/
Report Abuse
mamaguy is not online. mamaguy
Joined: 07 Oct 2010
Total Posts: 7073
16 Jul 2012 05:24 PM
bumpity
Report Abuse
swmaniac is not online. swmaniac
Joined: 28 Jun 2008
Total Posts: 15773
16 Jul 2012 05:27 PM
Yes.
Report Abuse
mamaguy is not online. mamaguy
Joined: 07 Oct 2010
Total Posts: 7073
16 Jul 2012 05:31 PM
Forgot to include an error I get,
'Workspace.Functions: '(' expected near 'Fog1''
I don't know what it means :/
Report Abuse
swmaniac is not online. swmaniac
Joined: 28 Jun 2008
Total Posts: 15773
16 Jul 2012 05:36 PM
Oh, missed something.

_G.Fog = (function(end1) -- Don't need to give the function a name twice.
Report Abuse
su8 is not online. su8
Joined: 06 Mar 2009
Total Posts: 6334
16 Jul 2012 05:37 PM
remove the "fog1" from the first line
Report Abuse
1pie23 is not online. 1pie23
Joined: 11 Jul 2010
Total Posts: 1865
16 Jul 2012 05:51 PM
(function (end1))
Report Abuse
1pie23 is not online. 1pie23
Joined: 11 Jul 2010
Total Posts: 1865
16 Jul 2012 05:51 PM
(function(end1))*
Report Abuse
swmaniac is not online. swmaniac
Joined: 28 Jun 2008
Total Posts: 15773
16 Jul 2012 05:52 PM
@1pie23
Either with or without the space works.
Report Abuse
1pie23 is not online. 1pie23
Joined: 11 Jul 2010
Total Posts: 1865
16 Jul 2012 05:53 PM
k
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