|
| 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 |
|
|
| |
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 11 Jan 2015 03:42 PM |
game.ServerStorage[name]Money.Value
|
|
|
| Report Abuse |
|
|
| |
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 11 Jan 2015 04:27 PM |
| game.ServerStorage[name].Money.Value |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 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 |
|
|