enzo90
|
  |
| Joined: 25 Mar 2012 |
| Total Posts: 7104 |
|
|
| 17 Jun 2014 11:45 AM |
--I'm trying to get one player on the team bright blue whilst all others are on bright green. Output: 12:34:48.027 - Workspace.Script:6: '=' expected near 'blue' --creating teams local Spawn = Instance.new("Team", Game:GetService("Teams")) Spawn.Name = tostring(game.Workspace.SpawnLocation1.BrickColor)--Bright blue Spawn.TeamColor = tostring(game.Workspace.SpawnLocation1.BrickColor) Bright blue=game.Teams.Autoassignable=false
local Spawn = Instance.new("Team", Game:GetService("Teams")) Spawn.Name = tostring(game.Workspace.SpawnLocation.BrickColor) Spawn.TeamColor = game.Workspace.SpawnLocation.BrickColor wait (.5) --Assigning teams function random() players = game.Players:GetPlayers() player = players[math.random(1,#players)] player.TeamColor = "Bright green" end |
|
|
| Report Abuse |
|
|
|
| 17 Jun 2014 11:46 AM |
Bright blue=game.Teams.Autoassignable=false
You cant have 2 ='s in the same line like that. Change that to this;
game.Teams["Bright blue"].Autoassignable = false |
|
|
| Report Abuse |
|
|
enzo90
|
  |
| Joined: 25 Mar 2012 |
| Total Posts: 7104 |
|
|
| 17 Jun 2014 12:32 PM |
| Workspace.Script:5: bad argument #3 to 'TeamColor' (BrickColor expected, got string) |
|
|
| Report Abuse |
|
|
enzo90
|
  |
| Joined: 25 Mar 2012 |
| Total Posts: 7104 |
|
|
| 17 Jun 2014 12:49 PM |
Output: Workspace.Script:6: bad argument #3 to 'TeamColor' (BrickColor expected, got string)
--creating teams local Spawn = Instance.new("Team", Game:GetService("Teams")) Spawn.Name = "Bright blue"--Bright blue Spawn.TeamColor = "Bright blue"--Here is the error according to output game.Teams["Bright blue"].Autoassignable = false
local Spawn = Instance.new("Team", Game:GetService("Teams")) Spawn.Name = "Bright green"--Bright green Spawn.TeamColor = "Bright green"--Bright green wait (.5) --Assigning teams C: for i,v in pairs(Game.Players:GetPlayers()) do v.TeamColor="Bright green"--Assigns player to bright green end local random = game.Players:GetPlayers ()[math.random (1,game.Players.NumPlayers)] random.TeamColor="Bright blue"--Assigns random player to bright blue
|
|
|
| Report Abuse |
|
|
|
| 17 Jun 2014 12:50 PM |
| Spawn.TeamColor.Name = "Bright blue" --use .Name |
|
|
| Report Abuse |
|
|
enzo90
|
  |
| Joined: 25 Mar 2012 |
| Total Posts: 7104 |
|
|
| 17 Jun 2014 12:55 PM |
12:53:40.450 - Name cannot be assigned to 12:53:40.451 - Script 'Workspace.Script', Line 6 12:53:40.451 - Stack End |
|
|
| Report Abuse |
|
|
enzo90
|
  |
| Joined: 25 Mar 2012 |
| Total Posts: 7104 |
|
|
| 17 Jun 2014 12:58 PM |
| This gets so frustrating... |
|
|
| Report Abuse |
|
|
enzo90
|
  |
| Joined: 25 Mar 2012 |
| Total Posts: 7104 |
|
|
| 17 Jun 2014 01:00 PM |
Here's what I have for getting the teams local Spawn = Instance.new("Team", Game:GetService("Teams")) Spawn.Name = "Bright blue"--Bright blue Spawn.TeamColor.Name = "Bright blue" --use .Name game.Teams["Bright blue"].Autoassignable = false
local Spawn2 = Instance.new("Team", Game:GetService("Teams"))--[[I changed it to spawn 2, in case the script got confused since I believe it can still access data from the Spawn above it]] Spawn2.Name = "Bright green"--Bright green Spawn2.TeamColor.Name = "Bright green"--use .Name |
|
|
| Report Abuse |
|
|
enzo90
|
  |
| Joined: 25 Mar 2012 |
| Total Posts: 7104 |
|
|
| 17 Jun 2014 01:01 PM |
| What the heck...now there is only one team. |
|
|
| Report Abuse |
|
|
|
| 17 Jun 2014 01:02 PM |
| Oh wait, .Name is used for if then statements, use Spawn.TeamColor = BrickColor.new("Bright blue") |
|
|
| Report Abuse |
|
|
enzo90
|
  |
| Joined: 25 Mar 2012 |
| Total Posts: 7104 |
|
|
| 17 Jun 2014 01:05 PM |
Output:Autoassignable is not a valid member of Team
What the heck...and only "Bright blue" team is appearing, likely because I have break on error checked. |
|
|
| Report Abuse |
|
|