|
| 20 Apr 2014 01:12 PM |
| How do I say if a player in the team dies? |
|
|
| Report Abuse |
|
|
transIate
|
  |
| Joined: 20 Jun 2013 |
| Total Posts: 2699 |
|
| |
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 20 Apr 2014 01:31 PM |
| The scripts are not responding |
|
|
| Report Abuse |
|
|