|
| 07 Sep 2014 02:29 PM |
How would I clone 3 different items from a server storage and move them into workspace at the same time? Object's names are Peanut butter, Jelly, and Sandwich.
|
|
|
| Report Abuse |
|
|
|
| 07 Sep 2014 02:30 PM |
game.ServerStorage["Peanut butter"]:clone().Parent = game.Workspace game.ServerStorage["Jelly"]:clone().Parent = game.Workspace game.ServerStorage["Sandwich"]:clone().Parent = game.Workspace |
|
|
| Report Abuse |
|
|
|
| 07 Sep 2014 02:33 PM |
Yeah, I know that, but is there a way to do it with tables or something? Would this work?
things = { game.Serverstorage.item game.Serverstorage.item game.Serverstorage.item }
things:Clone().Parent = game.Workspace
I know it wouldnt work cuz gramatical mistakes and such, but would that concept work? |
|
|
| Report Abuse |
|
|
|
| 07 Sep 2014 02:36 PM |
| i'm a new scripter too, not familiar with tables yet |
|
|
| Report Abuse |
|
|
Jake0128
|
  |
| Joined: 09 Aug 2013 |
| Total Posts: 1631 |
|
|
| 07 Sep 2014 02:36 PM |
With an iterator function, it would.
for i=1, #things do
things[i]:Cline().Parent = game.Workspace
end |
|
|
| Report Abuse |
|
|
|
| 07 Sep 2014 02:45 PM |
| But is it possible to do it with the table. |
|
|
| Report Abuse |
|
|
Jake0128
|
  |
| Joined: 09 Aug 2013 |
| Total Posts: 1631 |
|
|
| 07 Sep 2014 02:47 PM |
Yeah, just combine the two parts and put em into one big script.
things = { game.Serverstorage.item game.Serverstorage.item game.Serverstorage.item }
for i=1, #things do things[i]:Clone().Parent=workspace end |
|
|
| Report Abuse |
|
|
| |
|