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: If there is already a player in team.

Previous Thread :: Next Thread 
kentpent1234 is not online. kentpent1234
Joined: 29 Dec 2010
Total Posts: 220
27 Jul 2015 12:58 PM
local Green = script.Parent

function Pan(player)
player.TeamColor = BrickColor.new("Camo")
if -- this is where im not sure.
end

Green.ClickDetector.MouseClick:connect(Pan)


How would I put: If there is already a player in Team Camo
Report Abuse
kentpent1234 is not online. kentpent1234
Joined: 29 Dec 2010
Total Posts: 220
27 Jul 2015 01:25 PM
I think I got a bit further


local Green = script.Parent

function Pan(player, characters)
if characters.TeamColor("Camo") == 0 then
player.TeamColor = BrickColor.new("Camo")
else characters.TeamColor = BrickColor.new("Medium stone gray")
end
end

Green.ClickDetector.MouseClick:connect(Pan)
Report Abuse
kentpent1234 is not online. kentpent1234
Joined: 29 Dec 2010
Total Posts: 220
27 Jul 2015 01:47 PM
Should I add a NumberValue in to the Camo Team?
That might count the amount of players in Camo team.
Report Abuse
DeathsLASTwords is not online. DeathsLASTwords
Joined: 28 Jan 2012
Total Posts: 2701
27 Jul 2015 02:15 PM
game.Players.PlayerAdded:connect(function(player)
while true do
wait(0.75)
current = 0
for i,v in pairs(game.Players:GetChildren()) do
if v.TeamColor == BrickColor.new("Really blue") then -- if one player is on team, returns true
current = current+1
if current >= 1 then player.TeamColor == BrickColor.new("NEWTEAMCOLORHERE")
end
end
end
end
end)

you could do this script for every team you wanted checked, this is just a simple script I made.
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