|
| 05 Sep 2011 06:57 PM |
Ok, I need help, I can't figure out how to use the Died function. Lets say i'm making a custom spawn without a spawn location so when the Player dies I want it to teleport to the custom spawn in this case (T1) would I do this or is there a different way?: player = script.Parent while true do if player.Humanoid.Health == 0 then wait(0.1) player.MoveTo(Workspace.T1.Position) wait() end it doesn't look right i'm pretty sure there is a different way. Can anybody help? Thanks for your time I appreciate you reading this. |
|
|
| Report Abuse |
|
|
|
| 05 Sep 2011 06:59 PM |
| Excuse my error i meant Player:MoveTo() btw |
|
|
| Report Abuse |
|
|
nate890
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 21686 |
|
|
| 05 Sep 2011 07:00 PM |
game.Players.PlayerAdded:connect(function(player) player.ChildAdded:connect(function(character) character.Humanoid.Died:connect(function(died) --stuff end) end) end)
<'+1 Post. Ujelly?'> |
|
|
| Report Abuse |
|
|
|
| 05 Sep 2011 07:02 PM |
game.Players.PlayerAdded:connect(function(p) p.CharacterAdded:connect(function(c) c:MoveTo(Workspace.T1.Position) end) end)
-Like an __AWESOME__ boss |
|
|
| Report Abuse |
|
|
|
| 05 Sep 2011 07:02 PM |
player = script.Parent while true do if player.Humanoid.Health == 0 then wait(0.1) player:MoveTo(Workspace.T1.Position) --You have to put a : not a . wait() end
'_' LOLHAI |
|
|
| Report Abuse |
|
|
|
| 05 Sep 2011 07:07 PM |
game.Players.PlayerAdded:connect(function(p) p.CharacterAdded:connect(function(c) c.Humanoid.Died:connect(function() c:MoveTo(game.Workspace.T1.Position end) end) end)
Youre all wrong |
|
|
| Report Abuse |
|
|
|
| 05 Sep 2011 07:07 PM |
| whoops add a ) after position |
|
|
| Report Abuse |
|
|
nate890
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 21686 |
|
|
| 05 Sep 2011 07:08 PM |
^Lolwut? You just copied mine, and rewrote the tags, and just copied his line of code and forgot a parenthesis. You're wrong.
<'+1 Post. Ujelly?'> |
|
|
| Report Abuse |
|
|
|
| 05 Sep 2011 07:14 PM |
Yes but yours would fire any time something was put in the player mine only fires with the character being added So your wrong
|
|
|
| Report Abuse |
|
|
nate890
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 21686 |
|
|
| 05 Sep 2011 07:17 PM |
Please tell me I didn't use 'ChildAdded'
*Looks*
YOU HAVE GOT TO BE KIDDING ME.
For some reason I constantly do that when meaning to put characteradded >.<
<'+1 Post. Ujelly?'>
<'+1 Post. Ujelly?'> |
|
|
| Report Abuse |
|
|