andrei012
|
  |
| Joined: 05 Nov 2010 |
| Total Posts: 279 |
|
|
| 05 Aug 2013 02:46 AM |
| how do you recognize players team? lets say he touched a brick and the scipt will print his team name not teamcolor thanks :) |
|
|
| Report Abuse |
|
|
ZachBloxx
|
  |
| Joined: 26 Jun 2013 |
| Total Posts: 2833 |
|
|
| 05 Aug 2013 02:48 AM |
teams = game.Teams:GetTeams()
script.Parent.Touched:connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") then Character = hit.Parent Player = game.Players:GetPlayerFromCharacter(Character) for i, team in pairs(teams) do if Player.TeamColor == team.TeamColor then print(team.Name) end end end end) |
|
|
| Report Abuse |
|
|
andrei012
|
  |
| Joined: 05 Nov 2010 |
| Total Posts: 279 |
|
|
| 05 Aug 2013 02:50 AM |
Thx but can you tell me what does these things do?? for i, team in pairs(teams) do What is I,V,etc i commonly see them in scripts |
|
|
| Report Abuse |
|
|
ZachBloxx
|
  |
| Joined: 26 Jun 2013 |
| Total Posts: 2833 |
|
|
| 05 Aug 2013 02:52 AM |
I don't have time to explain it, just read this:
http://wiki.roblox.com/index.php/Pairs#pairs |
|
|
| Report Abuse |
|
|
andrei012
|
  |
| Joined: 05 Nov 2010 |
| Total Posts: 279 |
|
| |
|
ZachBloxx
|
  |
| Joined: 26 Jun 2013 |
| Total Posts: 2833 |
|
| |
|
andrei012
|
  |
| Joined: 05 Nov 2010 |
| Total Posts: 279 |
|
|
| 05 Aug 2013 03:01 AM |
| but idk how in those kind of functions .-. |
|
|
| Report Abuse |
|
|
andrei012
|
  |
| Joined: 05 Nov 2010 |
| Total Posts: 279 |
|
| |
|