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
We use cookies to offer you a better experience. By using Roblox.com, you are agreeing to our Privacy and Cookie Policy.
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Can I use a Variable in place of an Object Name?

Previous Thread :: Next Thread 
ChildOfGiotto is not online. ChildOfGiotto
Joined: 01 Apr 2014
Total Posts: 122
11 Jan 2015 03:04 PM
Say for instance, I had a few objects who shared a name with a name of each player who entered the game that had a NumberValue inside. Along with this I had a button with a script inside that wanted to access the NumberValue but can't use a specific name.

This would be the variable

name = humanoid.Parent.Name

And this would be the object with the numbervalue inside.

game.ServerStorage.name.Money.Value

I know this method doesn't work I just tried it because I'm fairly new to scripting and wanted to mess around, the question that I am asking you guys is. Is this possible in any way, and if not is there any other method to get the same thing done?
Report Abuse
ChildOfGiotto is not online. ChildOfGiotto
Joined: 01 Apr 2014
Total Posts: 122
11 Jan 2015 03:34 PM
Bump
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
11 Jan 2015 03:42 PM
game.ServerStorage[name]Money.Value
Report Abuse
ChildOfGiotto is not online. ChildOfGiotto
Joined: 01 Apr 2014
Total Posts: 122
11 Jan 2015 04:06 PM
Didn't work >.<
Report Abuse
eLunate is not online. eLunate
Joined: 29 Jul 2014
Total Posts: 13268
11 Jan 2015 04:27 PM
game.ServerStorage[name].Money.Value
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
11 Jan 2015 04:36 PM
what elun said, some reason the dot got removed or I forgot to add it
Report Abuse
ChildOfGiotto is not online. ChildOfGiotto
Joined: 01 Apr 2014
Total Posts: 122
11 Jan 2015 04:42 PM
Thanks, just before reading this I found another way to personalize the object to each player but this will definitely help me later on.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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