A22asin
|
  |
| Joined: 04 Jul 2011 |
| Total Posts: 313 |
|
|
| 31 Aug 2011 07:05 PM |
| hiya, i was wondering how do i find what team a player is on . i know that i have to do findFirstChild, but thats it. i wanted to do that if a player was on a specific team, they recieve a specific GUI different from others. PLZ Help. |
|
|
| Report Abuse |
|
|
Vultraz
|
  |
| Joined: 03 Jul 2008 |
| Total Posts: 1289 |
|
|
| 31 Aug 2011 07:16 PM |
You can check a player's TeamColor, I believe, then a bunch of if statements saying which GUI goes to which player when they join, then clones the GUI from somewhere to the player's PlayerGui. |
|
|
| Report Abuse |
|
|
A22asin
|
  |
| Joined: 04 Jul 2011 |
| Total Posts: 313 |
|
|
| 31 Aug 2011 07:18 PM |
| i know that, i just dont know how to determine which team a player is on. |
|
|
| Report Abuse |
|
|
Vultraz
|
  |
| Joined: 03 Jul 2008 |
| Total Posts: 1289 |
|
|
| 31 Aug 2011 07:18 PM |
Or.. Game.Players.ChildAdded:connect(function(player) if player.TeamColor == "SoAndSo" then script.SoAndSo:clone().Parent = player.PlayerGui end if player.TeamColor == "BlahAndBlah" then script.BlahAndBlah:clone().Parent = player.PlayerGui end --[[Make as many of the above lines as you want (except for Game.Players.ChildAdded) with the TeamColor and the GUI name. Put the GUI inside the script and make it that name, I guess.]]-- end) |
|
|
| Report Abuse |
|
|
Vultraz
|
  |
| Joined: 03 Jul 2008 |
| Total Posts: 1289 |
|
|
| 31 Aug 2011 07:21 PM |
| Ok, clearly I don't know what I'm talking about, so I'm going to back off now. |
|
|
| Report Abuse |
|
|
A22asin
|
  |
| Joined: 04 Jul 2011 |
| Total Posts: 313 |
|
|
| 31 Aug 2011 07:23 PM |
| lol, is your sciprt correct? |
|
|
| Report Abuse |
|
|
A22asin
|
  |
| Joined: 04 Jul 2011 |
| Total Posts: 313 |
|
|
| 01 Sep 2011 09:01 AM |
ok, so that didnt work, i put my GUIs within the script and still nothing. oh and u forgot to close the function. heres my version:
Game.Players.ChildAdded:connect(function(player) if player.TeamColor == "Cright red" then script.SPWeaponGUI:clone().Parent = player.PlayerGui elseif player.TeamColor == "Blright blue" then script.SAWeaponGUI:clone().Parent = player.PlayerGui end end) |
|
|
| Report Abuse |
|
|
A22asin
|
  |
| Joined: 04 Jul 2011 |
| Total Posts: 313 |
|
|
| 01 Sep 2011 09:02 AM |
| oh and "Cright" is supposed to be "Bright" srry. but still doesnt work |
|
|
| Report Abuse |
|
|
A22asin
|
  |
| Joined: 04 Jul 2011 |
| Total Posts: 313 |
|
| |
|
A22asin
|
  |
| Joined: 04 Jul 2011 |
| Total Posts: 313 |
|
| |
|
A22asin
|
  |
| Joined: 04 Jul 2011 |
| Total Posts: 313 |
|
| |
|