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: Finding Team Help

Previous Thread :: Next Thread 
A22asin is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. A22asin
Joined: 04 Jul 2011
Total Posts: 313
31 Aug 2011 07:23 PM
lol, is your sciprt correct?
Report Abuse
A22asin is not online. 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 is not online. 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 is not online. A22asin
Joined: 04 Jul 2011
Total Posts: 313
01 Sep 2011 09:53 AM
bump
Report Abuse
A22asin is not online. A22asin
Joined: 04 Jul 2011
Total Posts: 313
01 Sep 2011 12:47 PM
bump
Report Abuse
A22asin is not online. A22asin
Joined: 04 Jul 2011
Total Posts: 313
01 Sep 2011 02:20 PM
bump
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