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: How do I say if a player in team dies?

Previous Thread :: Next Thread 
SecretDAgent is not online. SecretDAgent
Joined: 28 Apr 2012
Total Posts: 46
20 Apr 2014 01:12 PM
How do I say if a player in the team dies?
Report Abuse
transIate is not online. transIate
Joined: 20 Jun 2013
Total Posts: 2699
20 Apr 2014 01:15 PM
what
Report Abuse
SenseiWarrior is online. SenseiWarrior
Joined: 09 Apr 2011
Total Posts: 12140
20 Apr 2014 01:16 PM
char.Humanoid.Died:connect(function()
plyr = game.Players:FindFirstChild(char.Name)
if plyr.TeamColor == "Bright Red" then
print("NOT THE RED!")
end
end)
Report Abuse
Spongocardo is not online. Spongocardo
Joined: 06 Sep 2008
Total Posts: 2843
20 Apr 2014 01:19 PM
Use the died event of a humanoid and then check if the player (player can be retrieved with the PlayerAdded and CharacterAdded events, or by using the GetPlayerFromCharacter method in players) TeamColor is equal to a team in Teams.
Example:

game.Players.PlayerAdded:connect(function(plr)
plr.CharacterAdded:connect(function(char)
char:WaitForChild("Humanoid").Died:connect(function()
local team = game.Teams.TEAMNAME --Change TEAMNAME to the name of the team.
print(plr.Name.."of "..team.Name.." has died!") --Example of use.
end)
end)
end)

Here's my siggy... Done.
Report Abuse
SecretDAgent is not online. SecretDAgent
Joined: 28 Apr 2012
Total Posts: 46
20 Apr 2014 01:31 PM
The scripts are not responding
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