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: Can this be done?

Previous Thread :: Next Thread 
Eggnivia is not online. Eggnivia
Joined: 30 May 2009
Total Posts: 4144
24 Jan 2014 10:09 PM
Key = e

string = sp.Keys.Key


If this is done, what will the variations be?
eg. if I have a frame called Key, will string look for that? Or will it look for the frame called e?

And if this can't be done, are there other methods to allowing a string to use another string as a tree directory?
Report Abuse
dog456pop248 is not online. dog456pop248
Joined: 24 Aug 2008
Total Posts: 3977
24 Jan 2014 10:11 PM
string = sp.Keys:findFirstChild(Key)
Report Abuse
ElectricAxel is not online. ElectricAxel
Joined: 15 May 2009
Total Posts: 16239
24 Jan 2014 10:11 PM
It'll look for the string called Key, this is to look for e:

string = sp.Keys[key] --now it looks for e


I LOVE THY NAME BTW, Anivia is so amazing. :B
Report Abuse
wazap is not online. wazap
Joined: 29 Jun 2007
Total Posts: 23234
24 Jan 2014 10:12 PM
I get it

It'll simply look for the object/Property "Key" in an object named "Keys" in a variable you defined as sp

It will never look for an object/property named "e" in "Keys"
Report Abuse
dog456pop248 is not online. dog456pop248
Joined: 24 Aug 2008
Total Posts: 3977
24 Jan 2014 10:12 PM
string = sp.Keys:findFirstChild(Key)
No, it'll look for an object called 'e' because Key was previosuly defined as "e"
Report Abuse
dog456pop248 is not online. dog456pop248
Joined: 24 Aug 2008
Total Posts: 3977
24 Jan 2014 10:13 PM
It's
string = sp.Keys:findFirstChild(Key)
not
string = sp.Keys:findFirstChild("Key")
Report Abuse
wazap is not online. wazap
Joined: 29 Jun 2007
Total Posts: 23234
24 Jan 2014 10:14 PM
Actually you guys do realize even if he uses [Key] or :FindFirstChild(Key) it still wont work right? unless e is a string value.

And my 1st comment was directed at OP.
Report Abuse
ElectricAxel is not online. ElectricAxel
Joined: 15 May 2009
Total Posts: 16239
24 Jan 2014 10:16 PM
Well, yeah, but he was trying to understand an idea, I guess he might have forgotten about the quotes, I personally didn't notice and tried to answer what I think he meant. But you are right Wazap. OP name is still epic though.
Report Abuse
Eggnivia is not online. Eggnivia
Joined: 30 May 2009
Total Posts: 4144
24 Jan 2014 11:05 PM
I have another question.

key = e
If I run stats.spells[key], am I able to look for children under key (e)? And if so, how would I write that? Would it be stats.spells[key]status.Value if I wanted to look for the value of status in e?
Report Abuse
wazap is not online. wazap
Joined: 29 Jun 2007
Total Posts: 23234
24 Jan 2014 11:07 PM
well
key = "e"
Then ya.
Report Abuse
ElectricAxel is not online. ElectricAxel
Joined: 15 May 2009
Total Posts: 16239
24 Jan 2014 11:11 PM
It would be

stats.spells[key].status.Value, but yes, like wazap said, if e is a string it'll work.
Report Abuse
wazap is not online. wazap
Joined: 29 Jun 2007
Total Posts: 23234
24 Jan 2014 11:13 PM
Shouldve given a more specific answer XD ty @electric
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