Kasumo
|
  |
| Joined: 22 Mar 2013 |
| Total Posts: 2467 |
|
|
| 23 Apr 2014 06:58 PM |
I need to make a respawn script for my NPC's, but nothing is working. This is the one that I have.
resp = script.Parent:clone()
script.Parent.Humanoid.Died:connect(function() wait(math.random(5,50) clone = resp:clone() clone.Parent = script.Parent.Parent clone:makeJoints() script.Parent:remove()
end) |
|
|
| Report Abuse |
|
|
Kasumo
|
  |
| Joined: 22 Mar 2013 |
| Total Posts: 2467 |
|
| |
|
magoo8
|
  |
| Joined: 25 Apr 2009 |
| Total Posts: 1122 |
|
| |
|
Kasumo
|
  |
| Joined: 22 Mar 2013 |
| Total Posts: 2467 |
|
| |
|
Kasumo
|
  |
| Joined: 22 Mar 2013 |
| Total Posts: 2467 |
|
|
| 23 Apr 2014 07:06 PM |
| Damn it, imma be banned now. forget this |
|
|
| Report Abuse |
|
|
magoo8
|
  |
| Joined: 25 Apr 2009 |
| Total Posts: 1122 |
|
|
| 23 Apr 2014 07:21 PM |
Nah you wont be banned, i wont report. >:D
Gimmy all yo robux! |
|
|
| Report Abuse |
|
|
Kasumo
|
  |
| Joined: 22 Mar 2013 |
| Total Posts: 2467 |
|
| |
|
Kasumo
|
  |
| Joined: 22 Mar 2013 |
| Total Posts: 2467 |
|
| |
|
Kasumo
|
  |
| Joined: 22 Mar 2013 |
| Total Posts: 2467 |
|
| |
|
|
| 01 May 2014 07:32 PM |
script.Parent.Humanoid.Died:connect(function(res) local modl = game.ServerStorage.ModelNPC -- location local time = math.random(5,50) if script.Parent.Humanoid.Health == 0 then -- check incase of malfunction wait(time) vr = modl:Clone() vr.Parent = game.Workspace vr:MakeJoints() vr:MoveTo(script.Parent.Head.Position) -- change location or it will spawn where the last NPC died. script.Parent:Destroy() end end) |
|
|
| Report Abuse |
|
|