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 » Scripters
Home Search
 

Re: i am trying to make a script that clones blocks

Previous Thread :: Next Thread 
001002003004 is not online. 001002003004
Joined: 26 Feb 2014
Total Posts: 48
31 Dec 2015 07:13 AM
i cant seem to get it.
Report Abuse
QuintinityZero is not online. QuintinityZero
Joined: 01 Oct 2008
Total Posts: 10618
31 Dec 2015 07:16 AM
local block = game.Workspace.Block
local block2 = block:Clone()
block2.Parent = game.Workspace

As an example
Report Abuse
001002003004 is not online. 001002003004
Joined: 26 Feb 2014
Total Posts: 48
31 Dec 2015 07:21 AM
still can't get it to work :/
I am trying to make a button that clones a part
Report Abuse
001002003004 is not online. 001002003004
Joined: 26 Feb 2014
Total Posts: 48
31 Dec 2015 07:22 AM
here's the script
function onClicked()
local Confetti = game.Workspace.Confetti
local Confetti2 = Confetti:Clone()
Confetti2.Parent = game.Workspace
end
Report Abuse
Socializealt1 is not online. Socializealt1
Joined: 08 Dec 2015
Total Posts: 43
31 Dec 2015 07:25 AM
i think you didnt call confetti2.

function onClicked()
local Confetti = game.Workspace.Confetti
local Confetti2 = Confetti:Clone().Parent = workspace
Confetti:Clone().Parent = workspace
--example stuff
Confetti2.transparency = 1
end

Yellow is the new Mellow | +2113 posts
Report Abuse
Socializealt1 is not online. Socializealt1
Joined: 08 Dec 2015
Total Posts: 43
31 Dec 2015 07:26 AM
oh, and did you call the function?
else it doesnt work.

under my script, put
script.Parent.ClickDetector.MouseClick:connect(onClicked)

and within the confetti part a clickdetector

Yellow is the new Mellow | +2113 posts
Report Abuse
Socializealt1 is not online. Socializealt1
Joined: 08 Dec 2015
Total Posts: 43
31 Dec 2015 07:32 AM
this works, i tried it myself:

function onClicked()
local Confetti = script.Parent
local Confetti2 = Confetti:Clone()
Confetti2.Parent = game.Workspace
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)

Yellow is the new Mellow | +2113 posts
Report Abuse
001002003004 is not online. 001002003004
Joined: 26 Feb 2014
Total Posts: 48
31 Dec 2015 07:52 AM
Still not working
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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