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: Just so all of you know..

Previous Thread :: Next Thread 
preztonizer is not online. preztonizer
Joined: 22 Oct 2008
Total Posts: 375
23 Oct 2014 03:27 PM
So I was wondering why my game was breaking, why I couldn't access lighting or workspace? For some reason in local scripts, you can use local to access a property of game... Like local game.Workspace -- DOESNT WORK or local game.Lighting -- DOESNT WORK. Just remove the local from the beginning of anything that accesses a property of game.
Report Abuse
eLunate is not online. eLunate
Joined: 29 Jul 2014
Total Posts: 13268
23 Oct 2014 03:30 PM
Damn if you thought you could do that you should discontinue your current projects and learn to Lua
Report Abuse
tyzone is not online. tyzone
Joined: 16 Aug 2008
Total Posts: 1726
23 Oct 2014 03:30 PM
That's because "local" is something you use to define a variable, not a targeted property.


local a = game.Lighting.Ambient
Report Abuse
preztonizer is not online. preztonizer
Joined: 22 Oct 2008
Total Posts: 375
23 Oct 2014 03:41 PM
You could do that, I have been working on a script for almost 2 weeks now and just today I can no longer use local in local scripts to access a game property I couldn't use local game.Lighting or local game.Workspace.CurrentCamera, only today.
Report Abuse
preztonizer is not online. preztonizer
Joined: 22 Oct 2008
Total Posts: 375
23 Oct 2014 03:42 PM
I meant to write for some reason you *cant use local to access a property of game.
Report Abuse
Dr01d3k4 is not online. Dr01d3k4
Joined: 11 Oct 2007
Total Posts: 17916
23 Oct 2014 03:44 PM
"local x.y" is a syntax error in Lua's grammar.
lua org/manual/5.1/manual.html#8
Report Abuse
eLunate is not online. eLunate
Joined: 29 Jul 2014
Total Posts: 13268
23 Oct 2014 03:44 PM
You were never able to use local to access properties of game...
Report Abuse
inapt is not online. inapt
Joined: 04 Oct 2008
Total Posts: 11666
23 Oct 2014 03:48 PM
lol
Report Abuse
preztonizer is not online. preztonizer
Joined: 22 Oct 2008
Total Posts: 375
23 Oct 2014 03:57 PM
You where, so...
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