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 » Scripters
Home Search
 

How do I get the players team color?

Previous Thread :: Next Thread 
Cyls is not online. Cyls
Joined: 31 Aug 2008
Total Posts: 166
24 Nov 2015 09:13 PM
Basically trying to make it so the team color of the player affects the tools handle.
Report Abuse
62GB is not online. 62GB
Joined: 03 Oct 2011
Total Posts: 4157
24 Nov 2015 09:14 PM
game.Players.LocalPlayer.TeamColor
Report Abuse
Cyls is not online. Cyls
Joined: 31 Aug 2008
Total Posts: 166
24 Nov 2015 09:21 PM
Is that the name or the actual color of it?
Report Abuse
62GB is not online. 62GB
Joined: 03 Oct 2011
Total Posts: 4157
24 Nov 2015 09:24 PM
There's a property in the player called 'TeamColor', and it's a BrickColor value.
Report Abuse
Cyls is not online. Cyls
Joined: 31 Aug 2008
Total Posts: 166
24 Nov 2015 09:32 PM
Would this be right?

script.Parent.BrickColor = BrickColor.new(game.Players.LocalPlayer.TeamColor)
Report Abuse
62GB is not online. 62GB
Joined: 03 Oct 2011
Total Posts: 4157
24 Nov 2015 09:35 PM
Yes, but the property 'TeamColor' is already a BrickColor so that would cause an error.
Report Abuse
Cyls is not online. Cyls
Joined: 31 Aug 2008
Total Posts: 166
24 Nov 2015 09:39 PM
What?

So how would I make it change the part?
Report Abuse
CypherScriptz is not online. CypherScriptz
Joined: 24 Oct 2015
Total Posts: 56
24 Nov 2015 09:41 PM
script.Parent.BrickColor = game.Players.LocalPlayer.TeamColor

Although it's assuming this is in a LocalScript.
Report Abuse
62GB is not online. 62GB
Joined: 03 Oct 2011
Total Posts: 4157
24 Nov 2015 09:41 PM
It's already a brickcolor. You're doing:

script.Parent.BrickColor = BrickColor.new(TeamColor) --its already a brickcolor


so you should be doing:

script.Parent.BrickColor = TeamColor
Report Abuse
thegoodpuppy is not online. thegoodpuppy
Joined: 07 Jul 2011
Total Posts: 2737
24 Nov 2015 09:48 PM
TeamColor gets the brick color and team color so basically all you need to do is team color, not brick color, am i right? lol
Report Abuse
CypherScriptz is not online. CypherScriptz
Joined: 24 Oct 2015
Total Posts: 56
24 Nov 2015 09:53 PM
No. TeamColor gets TeamColor.
TeamColor is just to be a BrickColor value, like how Name is a String value, so you can set the Part's BrickColor to the Player's TeamColor, because it's the same Value type, like how you can set Text to someone's Name, same Value type.

I guess they kind of are the same then.....
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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