|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|