|
| 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 |
|
|
|
| 02 Sep 2013 02:08 PM |
| Woah this was pushed down quick. Bump |
|
|
| Report Abuse |
|
|
Xtreme101
|
  |
| Joined: 03 Jan 2009 |
| Total Posts: 4385 |
|
| |
|
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 |
|
|
|
| 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 |
|
|
|
| 02 Sep 2013 02:15 PM |
| Instead of using Health, should I just add a NumberValue and use that instead? |
|
|
| Report Abuse |
|
|
| |
|
| |
|