Answered by
8 years ago Edited 8 years ago
This would not work because there is only one of said Instance. The way I would get around this is by cloning the Instance and then moving it to wherever you'd like to
Here is my script:
01 | local listofobjects = { |
02 | [ "owner" ] = Instance.new( "StringValue" ); |
03 | [ "type" ] = Instance.new( "StringValue" ); |
04 | [ "level" ] = Instance.new( "IntValue" ); |
05 | [ "health" ] = Instance.new( "IntValue" ); |
08 | for i,v in pairs (listofobjects) do |
11 | obj.Parent = workspace |
Using a for loop in tables will provide two values. The 'i' will provide the name of the variable, and the 'v' will provide what the variable is equal to
As you can see, it clones each Instance 10 times and puts them into workspace
.