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: Do _'s have any effect in lua in names?

Previous Thread :: Next Thread 
masterblokz is not online. masterblokz
Joined: 17 Nov 2010
Total Posts: 9517
14 Apr 2013 12:38 PM
Like an example:
If I had a map in lighting named blablabl_blablabl_blablabl

And I wanted to clone it, do the _'s have any effect on that, do I have to use :FindFirstChild(" ")
or can I just say game.Lighting.blablabl_BLablalb_blalbal:Clone()
Report Abuse
notsopwnedg is not online. notsopwnedg
Joined: 07 Nov 2010
Total Posts: 4182
14 Apr 2013 12:40 PM
I don't believe so.
if it has a space or starts with a number number you can just do

Game.Lighting["21313 blah blah blah"]
Report Abuse
ForceSky is not online. ForceSky
Joined: 30 Jul 2012
Total Posts: 2379
14 Apr 2013 12:41 PM
Test the script and find out.
Report Abuse
masterblokz is not online. masterblokz
Joined: 17 Nov 2010
Total Posts: 9517
14 Apr 2013 12:42 PM
thank's pwned.
I have a table of maps, like {vv.Map, vv.Mapp}
Just an example.
So I can do {vv.Map, vv.Mapp, vv[This has spaces]}
Report Abuse
killjoy37 is not online. killjoy37
Joined: 27 Aug 2008
Total Posts: 2821
14 Apr 2013 01:46 PM
Not sure if you can use periods
Report Abuse
adark is not online. adark
Joined: 13 Jan 2008
Total Posts: 6412
14 Apr 2013 02:12 PM
You have to use quotation marks inside the square brackets if you're using a string literal to find the object. No quotes means that Lua is looking for the variable with the name of whatever you put in there.
Report Abuse
btft is not online. btft
Joined: 19 Feb 2011
Total Posts: 1512
14 Apr 2013 02:29 PM
game.Lighting["blablabl_blablalb_blalba"].asdf
Report Abuse
adark is not online. adark
Joined: 13 Jan 2008
Total Posts: 6412
15 Apr 2013 12:12 PM
Quite.
Report Abuse
AgentFirefox is not online. AgentFirefox
Top 100 Poster
Joined: 20 Jun 2008
Total Posts: 22404
15 Apr 2013 01:15 PM
Um...

workspace.This_Is_My_Object

That's valid.
_ is a valid identifier character in Lua, meaning you can use it as a name for indexing as well.
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