|
| 27 Oct 2012 11:03 AM |
| I can't figure out how to make an OnDied script that isn't an OnRespawned script. I need to make this so I can make a script that lets you manually respawn once you die. There's no point in letting you manually respawn once you respawn. |
|
|
| Report Abuse |
|
|
|
| 27 Oct 2012 11:05 AM |
game.Players.PlayerAdded:connect(function(player) if player.Character.Humanoid.Health = 0 then player:LoadCharacter() end end)
Not sure if that would work or not.
Tactical Rainboom Inbound |
|
|
| Report Abuse |
|
|
|
| 27 Oct 2012 11:06 AM |
| I'll try modifying that to make it give you a GUI once you die. |
|
|
| Report Abuse |
|
|
gerit99
|
  |
| Joined: 21 Jul 2010 |
| Total Posts: 521 |
|
|
| 27 Oct 2012 11:07 AM |
Not sure about player:LoadCharacter(), but:
game.Players.PlayerAdded:connect(function(player) if player.Character.Humanoid.Health == 0 then player:LoadCharacter() end end) double = at line 2 |
|
|
| Report Abuse |
|
|
|
| 27 Oct 2012 11:08 AM |
Oh, yeah. Darn, I always forget the double = :P
Tactical Rainboom Inbound |
|
|
| Report Abuse |
|
|
gerit99
|
  |
| Joined: 21 Jul 2010 |
| Total Posts: 521 |
|
|
| 27 Oct 2012 11:09 AM |
| I always forget wait()'s in while true do xD |
|
|
| Report Abuse |
|
|
|
| 27 Oct 2012 11:11 AM |
| @gerit99 - You don't have to know what to do with LoadCharacter. The script is supposed to give you a GUI in StarterGui (called LoadScreen) that allows you to respawn, not automatically respawn you. That script you fixed doesn't work with the double either. |
|
|
| Report Abuse |
|
|
gerit99
|
  |
| Joined: 21 Jul 2010 |
| Total Posts: 521 |
|
|
| 27 Oct 2012 11:15 AM |
| Then loadCharacter doesn't work. |
|
|
| Report Abuse |
|
|
|
| 27 Oct 2012 11:19 AM |
Okay, I'll give you a script to put in a text button (put in a local script)
script.Parent.MouseButton1Down:connect(function() game.Players.LocalPlayer:LoadCharacter() end
I think it'd be that simple.
Tactical Rainboom Inbound |
|
|
| Report Abuse |
|
|
|
| 27 Oct 2012 11:19 AM |
| LoadCharacter works. I am using it right now. I also found a different way to solve the problem, so I don't need this thread anymore. |
|
|
| Report Abuse |
|
|