|
| 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
|
  |
| 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
|
  |
| 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 |
|
|
|
| 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 |
|
|
|
| 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
|
  |
| 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
|
  |
| 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
|
  |
| Joined: 04 Oct 2008 |
| Total Posts: 11666 |
|
| |
|
| |
|