|
| 30 Nov 2011 07:01 PM |
| Lets say if a player dies how would I return the name of the player that died? |
|
|
| Report Abuse |
|
|
|
| 30 Nov 2011 07:04 PM |
Name = "" game.Workspace[Name].Humanoid.Died:connect(function() print(Name.." has died!") end) |
|
|
| Report Abuse |
|
|
|
| 30 Nov 2011 07:08 PM |
Tried that but I get this in the output
20:07:50 - is not a valid member of Workspace |
|
|
| Report Abuse |
|
|
|
| 30 Nov 2011 07:10 PM |
| Put your name in the variable "Name" |
|
|
| Report Abuse |
|
|
|
| 30 Nov 2011 07:11 PM |
| I want to return the name of who died so if anyone dies it will go in a table or something. |
|
|
| Report Abuse |
|
|
|
| 30 Nov 2011 07:12 PM |
| *IF anyone dies there name will go in a table or var or something* |
|
|
| Report Abuse |
|
|
|
| 30 Nov 2011 07:14 PM |
pcall(function() for i,v in pairs(game.Players:GetChildren()) do v.Character.Humanoid.Died:connect(function() print(v.." has died!") end) end end) |
|
|
| Report Abuse |
|
|
|
| 30 Nov 2011 07:17 PM |
| I triedd that but for some reason it printed nothing... |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
|
| 30 Nov 2011 08:24 PM |
| Maybe the wiki could help you, considering that you are the one responsible for all this havoc. |
|
|
| Report Abuse |
|
|
|
| 30 Nov 2011 08:25 PM |
| I tried the wiki but couldn't find anything. |
|
|
| Report Abuse |
|
|
gaara51
|
  |
| Joined: 20 Oct 2007 |
| Total Posts: 7395 |
|
|
| 30 Nov 2011 08:29 PM |
shout = instance.new("Hint",game.Workspace) shout.Name = "Shout" Name = "" game.Workspace[Name].Humanoid.Died:connect(function() shout.Text = Name.."Has Died!" wait(3) shout.Text = "" end)
Kkthx. |
|
|
| Report Abuse |
|
|
|
| 30 Nov 2011 08:32 PM |
@^ I want it to be any player not just 1 player ex If ANY player dies then make base CanCollide = false
|
|
|
| Report Abuse |
|
|
|
| 30 Nov 2011 08:32 PM |
| I also want to return the name of the player who died. |
|
|
| Report Abuse |
|
|
| |
|
|
| 30 Nov 2011 09:19 PM |
| I'm in need of this soo bad! |
|
|
| Report Abuse |
|
|
miz656
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 15336 |
|
|
| 30 Nov 2011 09:29 PM |
game.Workspace.miz656.Humanoid.Died:connect(function(Wahwahwah) print("miz died :O") end)
Do you mean that? It prints miz died when miz Humanoid's health is 0 |
|
|
| Report Abuse |
|
|
|
| 30 Nov 2011 09:30 PM |
| I want it so if ANY player dies it will put there name in a var. |
|
|
| Report Abuse |
|
|
| |
|
miz656
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 15336 |
|
|
| 30 Nov 2011 09:35 PM |
Do you mean like a variable like?
dead people = ""
Or do you mean anyone dieing?
game.Players.PlayerAdded:connect(function(p) p.Humanoid.Died:connect(function(dead) print("dead") end) end)
|
|
|
| Report Abuse |
|
|
| |
|
miz656
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 15336 |
|
|
| 30 Nov 2011 09:37 PM |
| If you want anyone dieing use the script I made and it will print. |
|
|
| Report Abuse |
|
|
|
| 30 Nov 2011 09:52 PM |
@Miz You mean the second one? |
|
|
| Report Abuse |
|
|