generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Player died

Previous Thread :: Next Thread 
pokemon771 is not online. pokemon771
Joined: 28 Oct 2008
Total Posts: 8671
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
TigerBloodd is not online. TigerBloodd
Joined: 24 Oct 2010
Total Posts: 2430
30 Nov 2011 07:04 PM
    Name = ""
    game.Workspace[Name].Humanoid.Died:connect(function()
        print(Name.." has died!")
    end)
Report Abuse
pokemon771 is not online. pokemon771
Joined: 28 Oct 2008
Total Posts: 8671
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
TigerBloodd is not online. TigerBloodd
Joined: 24 Oct 2010
Total Posts: 2430
30 Nov 2011 07:10 PM
Put your name in the variable "Name"
Report Abuse
pokemon771 is not online. pokemon771
Joined: 28 Oct 2008
Total Posts: 8671
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
pokemon771 is not online. pokemon771
Joined: 28 Oct 2008
Total Posts: 8671
30 Nov 2011 07:12 PM
*IF anyone dies there name will go in a table or var or something*
Report Abuse
TigerBloodd is not online. TigerBloodd
Joined: 24 Oct 2010
Total Posts: 2430
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
pokemon771 is not online. pokemon771
Joined: 28 Oct 2008
Total Posts: 8671
30 Nov 2011 07:17 PM
I triedd that but for some reason it printed nothing...
Report Abuse
pokemon771 is not online. pokemon771
Joined: 28 Oct 2008
Total Posts: 8671
30 Nov 2011 07:30 PM
Help please.
Report Abuse
pokemon771 is not online. pokemon771
Joined: 28 Oct 2008
Total Posts: 8671
30 Nov 2011 07:57 PM
Anyone??
Report Abuse
pokemon771 is not online. pokemon771
Joined: 28 Oct 2008
Total Posts: 8671
30 Nov 2011 08:22 PM
Guys... PLEASE.
Report Abuse
Swordphin123 is not online. Swordphin123
Joined: 09 Apr 2008
Total Posts: 5234
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
pokemon771 is not online. pokemon771
Joined: 28 Oct 2008
Total Posts: 8671
30 Nov 2011 08:25 PM
I tried the wiki but couldn't find anything.
Report Abuse
gaara51 is not online. 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
pokemon771 is not online. pokemon771
Joined: 28 Oct 2008
Total Posts: 8671
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
pokemon771 is not online. pokemon771
Joined: 28 Oct 2008
Total Posts: 8671
30 Nov 2011 08:32 PM
I also want to return the name of the player who died.
Report Abuse
pokemon771 is not online. pokemon771
Joined: 28 Oct 2008
Total Posts: 8671
30 Nov 2011 09:07 PM
Please I need help!
Report Abuse
pokemon771 is not online. pokemon771
Joined: 28 Oct 2008
Total Posts: 8671
30 Nov 2011 09:19 PM
I'm in need of this soo bad!
Report Abuse
miz656 is not online. 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
pokemon771 is not online. pokemon771
Joined: 28 Oct 2008
Total Posts: 8671
30 Nov 2011 09:30 PM
I want it so if ANY player dies it will put there name in a var.
Report Abuse
pokemon771 is not online. pokemon771
Joined: 28 Oct 2008
Total Posts: 8671
30 Nov 2011 09:32 PM
Variable*
Report Abuse
miz656 is not online. 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
pokemon771 is not online. pokemon771
Joined: 28 Oct 2008
Total Posts: 8671
30 Nov 2011 09:35 PM
Anyone dieing
Report Abuse
miz656 is not online. 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
pokemon771 is not online. pokemon771
Joined: 28 Oct 2008
Total Posts: 8671
30 Nov 2011 09:52 PM
@Miz
You mean the second one?
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image