|
| 12 Sep 2015 11:06 PM |
| if someone dies, how do i make there character not break all joints and just go back to the spawn location...? |
|
|
| Report Abuse |
|
|
TwoRivers
|
  |
| Joined: 25 Aug 2011 |
| Total Posts: 2821 |
|
|
| 12 Sep 2015 11:10 PM |
player:LoadCharacter()
-TwoRivers/Iterum/Vulnerite/ChiefDelta/Discommodate/100+ accounts |
|
|
| Report Abuse |
|
|
|
| 12 Sep 2015 11:11 PM |
wait_for_death = function(plr) local listener = plr.Character.Humanoid.Died(function() plr:LoadCharacter() wait_for_death() listener:disconnect() end) end |
|
|
| Report Abuse |
|
|
TwoRivers
|
  |
| Joined: 25 Aug 2011 |
| Total Posts: 2821 |
|
|
| 12 Sep 2015 11:13 PM |
what the hell phoenix lol
game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(char) local hum = char:WaitForChild("Humanoid") hum.Died:connect(function() player:LoadCharacter() end) end) end)
-TwoRivers/Iterum/Vulnerite/ChiefDelta/Discommodate/100+ accounts |
|
|
| Report Abuse |
|
|
|
| 12 Sep 2015 11:14 PM |
Ah, but that version only runs once. Trust me, I just made that mistake like a week ago.
This is exactly what I used:
coroutine.wrap(function() while wait(1) do if _player~=nil and _player.Character~=nil and _player.Character:FindFirstChild("Humanoid") and _player.Character.Humanoid.Health==0 then _player:LoadCharacter() _player.Character:WaitForChild("ForceField"):Destroy() else wait(.8) end end end)() |
|
|
| Report Abuse |
|
|
TwoRivers
|
  |
| Joined: 25 Aug 2011 |
| Total Posts: 2821 |
|
|
| 12 Sep 2015 11:16 PM |
THE HELL IS THAT CODE BRO LOL
NAH MAN MY CODE WORKS
-TwoRivers/Iterum/Vulnerite/ChiefDelta/Discommodate/100+ accounts |
|
|
| Report Abuse |
|
|
|
| 12 Sep 2015 11:17 PM |
| Both are fine, i just needed the function name. |
|
|
| Report Abuse |
|
|