|
| 21 Apr 2014 01:32 PM |
| I have a humanoid target that after it dies, I want it to regen. How would that work? |
|
|
| Report Abuse |
|
|
| |
|
URX
|
  |
| Joined: 10 Nov 2009 |
| Total Posts: 1054 |
|
|
| 21 Apr 2014 01:35 PM |
name="Humanoid" robo=script.Parent:clone() -- put script in humanoid so the model is the parent of the script while true do wait(10) if script.Parent.Human.Health<1 then robot=robo:clone() robot.Parent=script.Parent.Parent robot:makeJoints() script.Parent:remove() end end |
|
|
| Report Abuse |
|
|
| |
|
URX
|
  |
| Joined: 10 Nov 2009 |
| Total Posts: 1054 |
|
|
| 21 Apr 2014 01:38 PM |
Sorry, change it to
name="Humanoid" robo=script.Parent:clone() -- put script in humanoid so the model is the parent of the script while true do wait(10) if script.Parent.Humanoid.Health<1 then robot=robo:clone() robot.Parent=script.Parent.Parent robot:makeJoints() script.Parent:remove() end end |
|
|
| Report Abuse |
|
|
|
| 21 Apr 2014 01:40 PM |
| All the script does it remove joints and the target falls apart lol |
|
|
| Report Abuse |
|
|
URX
|
  |
| Joined: 10 Nov 2009 |
| Total Posts: 1054 |
|
|
| 21 Apr 2014 01:42 PM |
| the wait(10) is re spawn time? If that's what you were referring to. |
|
|
| Report Abuse |
|
|
|
| 21 Apr 2014 01:46 PM |
| Never mind. I forgot to anchor.. xD |
|
|
| Report Abuse |
|
|
Mlatu
|
  |
| Joined: 01 Aug 2011 |
| Total Posts: 540 |
|
|
| 21 Apr 2014 01:51 PM |
--put this script in the humanoid~~
local saved_clone = script.Parent.Parent:Clone() saved_clone.Parent = game.ServerStorage script.Parent.Died:connect(function() saved_clone.Parent = script.Parent.Parent.Parent saved_clone:MakeJoints() script.Parent.Parent:Destroy() end) |
|
|
| Report Abuse |
|
|