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
 

Re: team change based on group (Help)

Previous Thread :: Next Thread 
AnDrEw5r3r5 is not online. AnDrEw5r3r5
Joined: 28 Dec 2015
Total Posts: 47
22 Sep 2017 04:50 PM
gah i feel like a noob for asking this.

but i am confused why this simple function isnt working.



game.Players.PlayerAdded:connect(function(player)
if(player:IsInGroup(1234)) then
player.TeamColor = player.TeamColor.new ("Camo")
end
end)

and yes i changed the group number in this post on purpose.
Report Abuse
Sublivion is not online. Sublivion
Joined: 16 Jun 2013
Total Posts: 2390
22 Sep 2017 05:13 PM
"player.TeamColor = player.TeamColor.new ("Camo")"

if this isn't calling an error, then you need to add some prints and debug, but anyway, just do it like this pls there is no reason to do colours and *insert #'s*

player.Team = game:GetService('Teams').XXXX


-sub the scrub
Report Abuse
gohan31865 is not online. gohan31865
Joined: 30 Jan 2011
Total Posts: 895
22 Sep 2017 05:13 PM
did u ever set up the teams beforehand?


#code error("you're*")
Report Abuse
AnDrEw5r3r5 is not online. AnDrEw5r3r5
Joined: 28 Dec 2015
Total Posts: 47
23 Sep 2017 07:31 PM
lolol yeah i setup the teams... i asked this question early tho, forgot trying to set TeamColor = TeamColor.new("Camo"), was an invalid concept... needed to set it to BrickColor.new because thats how teams are organised...

so instead put TeamColor = BrickColor.new("Camo")
Report Abuse
pidgey is not online. pidgey
Joined: 16 Jan 2008
Total Posts: 2739
23 Sep 2017 07:39 PM
why dont you just use Player.Team ?
player.Team = game.Teams.team
Report Abuse
LaeMVP is online. LaeMVP
Joined: 24 Jun 2013
Total Posts: 4416
23 Sep 2017 07:40 PM
new is not a valid member of TeamColor, and yeah uh just compare teams not the color
Report Abuse
AnDrEw5r3r5 is not online. AnDrEw5r3r5
Joined: 28 Dec 2015
Total Posts: 47
24 Sep 2017 03:55 PM
ok thx for the advice, ill start using player.team from now on :)
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