menu
Roblox Forum Archive
Home
User Search
Forums
Donate
search
settings
Home
User Search
Forums
Donate
launch
Go to User Dashboard
Forums
Scripting Helpers
Using variables in name
chevron_left
chevron_left
chevron_left
of
1
chevron_right
chevron_right
chevron_right
Using variables in name
LegendaryAdmiral
Join Date: 2011-10-27
Post Count: 200
#141164707
Tuesday, July 22, 2014 2:45 PM GMT
Is there any way to use variables in a model/part name? So say I have part, and i=10, it would be named part10
Go to point in time
arrow_right
10 minutes before
5 minutes before
At time of posting
5 minutes after
10 minutes after
more_horiz
cntkillme
Join Date: 2008-04-07
Post Count: 49450
#141164779
Tuesday, July 22, 2014 2:46 PM GMT
getfenv()["part" .. i] = blah
Go to point in time
arrow_right
10 minutes before
5 minutes before
At time of posting
5 minutes after
10 minutes after
more_horiz
LegendaryAdmiral
Join Date: 2011-10-27
Post Count: 200
#141165115
Tuesday, July 22, 2014 2:52 PM GMT
Thanks, but any way to do this with local variables? putting in front of it just gives an error
Go to point in time
arrow_right
10 minutes before
5 minutes before
At time of posting
5 minutes after
10 minutes after
more_horiz
cntkillme
Join Date: 2008-04-07
Post Count: 49450
#141165178
Tuesday, July 22, 2014 2:53 PM GMT
No, unless roblox gives us access to the debug table.
Go to point in time
arrow_right
10 minutes before
5 minutes before
At time of posting
5 minutes after
10 minutes after
more_horiz
cntkillme
Join Date: 2008-04-07
Post Count: 49450
#141165221
Tuesday, July 22, 2014 2:53 PM GMT
But you can do this: local stuff = {}; stuff["part" .. i] = blah; And you can do stuff["part10"] to access it
Go to point in time
arrow_right
10 minutes before
5 minutes before
At time of posting
5 minutes after
10 minutes after
more_horiz
LegendaryAdmiral
Join Date: 2011-10-27
Post Count: 200
#141165348
Tuesday, July 22, 2014 2:55 PM GMT
thanks
Go to point in time
arrow_right
10 minutes before
5 minutes before
At time of posting
5 minutes after
10 minutes after
more_horiz
chevron_left
chevron_left
chevron_left
of
1
chevron_right
chevron_right
chevron_right