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: clone() regen problems

Previous Thread :: Next Thread 
killajake25 is not online. killajake25
Joined: 31 Jan 2011
Total Posts: 1713
02 Sep 2013 02:03 PM
I'm making an Ore, it works fine, apart from when it regens. All the bricks become visible, but it doesn't regenerate.

This is at the very start of the script, which functions as soon as the script starts.
regenore = script.Parent:clone()

This is later in the script, which can only be started by another function which runs if it's hit, and if it's health goes to 0, etc....

function regen()
script.Parent.Ore.Transparency = 0
script.Parent.Ore2.Transparency = 0
script.Parent.Torso.Transparency = 0
regenore.Parent = game.Workspace.Ores.CopperOres
canbemined = true
end

Report Abuse
killajake25 is not online. killajake25
Joined: 31 Jan 2011
Total Posts: 1713
02 Sep 2013 02:08 PM
Woah this was pushed down quick. Bump
Report Abuse
Xtreme101 is not online. Xtreme101
Joined: 03 Jan 2009
Total Posts: 4385
02 Sep 2013 02:09 PM
So, what are you cloning?
Report Abuse
Xtreme101 is not online. Xtreme101
Joined: 03 Jan 2009
Total Posts: 4385
02 Sep 2013 02:11 PM
Sorry, didn't see the top. Do this:

function regen()
script.Parent.Ore.Transparency = 0
script.Parent.Ore2.Transparency = 0
script.Parent.Torso.Transparency = 0
regenore = script.Parent:clone()
regenore.Parent = game.Workspace.Ores.CopperOres
canbemined = true
end
Report Abuse
killajake25 is not online. killajake25
Joined: 31 Jan 2011
Total Posts: 1713
02 Sep 2013 02:12 PM
I tried that, but it clones the Ore when it's health is 0, so it won't work. Also, setting it's health to 10 doesn't work.
Report Abuse
killajake25 is not online. killajake25
Joined: 31 Jan 2011
Total Posts: 1713
02 Sep 2013 02:15 PM
Instead of using Health, should I just add a NumberValue and use that instead?
Report Abuse
killajake25 is not online. killajake25
Joined: 31 Jan 2011
Total Posts: 1713
02 Sep 2013 02:51 PM
Bump
Report Abuse
killajake25 is not online. killajake25
Joined: 31 Jan 2011
Total Posts: 1713
02 Sep 2013 03:10 PM
Bump. Help. :(
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