|
| 01 Jun 2015 12:00 PM |
I'm getting an error on the 12th line, saying a color3 expected. I'm not sure what it is, I'm pretty rusty, (haven't coded anything for a few months), so I'm trying to work out my error. It's probably simple. Please point it out if you know the answer - thanks!
teams = { "Bright green", "Really blue", "Hot pink", "Really red", "Institutional white" }
game.Players.PlayerAdded:connect(function(plr) for _,v in pairs(game.Players:GetChildren()) do for i = 1, #teams do if v.TeamColor == BrickColor.new(teams[i]) then table.remove(teams, i) end end end if #teams > 0 then plr.TeamColor = BrickColor.new(teams[math.random(1, #teams)]) else plr.TeamColor = BrickColor.new("Really black") end end)
I gotz me a siggy ;3 |
|
|
| Report Abuse |
|
|
|
| 01 Jun 2015 12:03 PM |
| A color3 is a 8-bit RGB value. |
|
|
| Report Abuse |
|
|
|
| 01 Jun 2015 12:06 PM |
I know that, it doesn't help. I need to know the problem that it is, because I'm using an array which contains the names of the BrickColors. TeamColor is a BrickColor value. Which is why I'm confused as to why it's not working.
I gotz me a siggy ;3 |
|
|
| Report Abuse |
|
|
|
| 01 Jun 2015 12:10 PM |
| Honestly I don't even know why you would need a script for this. Just set the teams to auto-assign. |
|
|
| Report Abuse |
|
|
|
| 01 Jun 2015 12:12 PM |
I don't need the script per-say, I just want to understand why it's not working. Like I said, I'm just getting back into ROBLOX and am trying to understand the fault I did.
I gotz me a siggy ;3 |
|
|
| Report Abuse |
|
|