|
| 10 Mar 2014 12:20 PM |
Here it is:
humanoid = game.Workspace.Pepper1Seedling1.Humanoid() currentHealth = humanoid.Health humanoid.HealthChanged:connect(function(health)
if Workspace.Pepper1Seedling1.humanoid.Health == 500 then game.Workspace.Pepper1Seedling1:remove() game.Lighting.Pepper1Seedling2:clone().parent = game.Workspace end end)
Basically I want it so that when the Pepper1Seedling1's health reaches 500, it removes itself then clones from lighting Pepper1Seedling2 (which is an upgrade from Pepper1Seedling1). So when it gets to 500, it levels up basically.
Please note the humanoid is actually not in Pepper1Seedling1 it is in a model in Pepper1Seedling1 (Workspace > Pepper1Seedling1 > Pepper - Seedling Tier 1 > Humanoid) as the script wont register spaces as a model... |
|
|
| Report Abuse |
|
|
Looah
|
  |
| Joined: 22 Feb 2013 |
| Total Posts: 922 |
|
|
| 10 Mar 2014 12:21 PM |
| this pure code of inefficiency |
|
|
| Report Abuse |
|
|
|
| 10 Mar 2014 12:22 PM |
| I am sorry, I am new to Lua. I just started learning today ._. |
|
|
| Report Abuse |
|
|
|
| 10 Mar 2014 12:26 PM |
| I didn't mean to offend you... x_x |
|
|
| Report Abuse |
|
|
|
| 10 Mar 2014 12:36 PM |
| Does anyone know? I kinda need it working. |
|
|
| Report Abuse |
|
|