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
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Noobie question with cloning

Previous Thread :: Next Thread 
Vampyroteuthiss is not online. Vampyroteuthiss
Joined: 17 Jun 2010
Total Posts: 11541
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
verbalAKspray is not online. verbalAKspray
Joined: 09 Jul 2014
Total Posts: 23685
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
Vampyroteuthiss is not online. Vampyroteuthiss
Joined: 17 Jun 2010
Total Posts: 11541
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
verbalAKspray is not online. verbalAKspray
Joined: 09 Jul 2014
Total Posts: 23685
07 Sep 2014 02:36 PM
i'm a new scripter too, not familiar with tables yet
Report Abuse
Jake0128 is not online. 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
Vampyroteuthiss is not online. Vampyroteuthiss
Joined: 17 Jun 2010
Total Posts: 11541
07 Sep 2014 02:45 PM
But is it possible to do it with the table.
Report Abuse
Jake0128 is not online. 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
Vampyroteuthiss is not online. Vampyroteuthiss
Joined: 17 Jun 2010
Total Posts: 11541
07 Sep 2014 02:51 PM
Thanks!
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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