|
| 01 Mar 2014 01:24 PM |
ok,first off,if u look further down in my script u can see see I CAN set "BackgroundColor" to a BrickColor.new(blabla..) but it WONT LET ME CHECK THE BackgroundColor!!
a = 0 teams = game.Lighting.Teams function check() tGui = script.Parent.Parent.Parent.Parent.TeamsGui if a == 0 then a = 1 c = script.Parent:clone() bcolors = {teams.BlueTeam.Color,teams.RedTeam.Color,teams.GreenTeam.Color} --storing them in tables,yes I have a model named "Teams" in game.Lighting
if c.BackgroundColor == BrickColor.new(bcolors[1].Value.Color) then --wont let me do this.. c.Parent = tGui.BlueTeam
elseif c.BackgroundColor == BrickColor.new(bcolors[2].Value.Color) then --or this... c.Parent = tGui.RedTeam
elseif c.BackgroundColor == BrickColor.new(bcolors[3].Value.Color) then --or this.. c.Parent = tGui.GreenTeam --it WILL NOT LET ME CHECK THE COLOR..IVE TRYED SO MANY DIFFRENT WAYS:(HELP! end end end
--ignore underneath this line..
while wait(1) do check() script.Parent.Text = script.Parent.Name.." Kos:" script.Parent.Text = script.Parent.Text..game.Players[""..script.Parent.Name..""].lstats.Kos.Value script.Parent.Text = script.Parent.Text.." Wos:"..game.Players[""..script.Parent.Name..""].lstats.Wos.Value script.Parent.BackgroundColor = BrickColor.new(game.Lighting.Teams[game.Players[""..script.Parent.Name..""].Team.Color.Value].Color.Value) end |
|
|
| Report Abuse |
|
|
|
| 01 Mar 2014 01:26 PM |
so basicly,i have a table that stores all 3 "Color"s from game.Lighting.Teams (yes I do have a model there,with that name)
it lets me assign BackgroundColor = BrickColor.new.. but it WONT let me check the backgroundcolor..
if c.BackgroundColor == BrickColor.new..etc why on earth wont this work?is there an easy fix or should I just give up forever? /\ lol(kinda) on that last bit..
but really,why wont this work?? |
|
|
| Report Abuse |
|
|
| |
|
| |
|
YumERAGON
|
  |
| Joined: 18 Apr 2012 |
| Total Posts: 3893 |
|
| |
|
YumERAGON
|
  |
| Joined: 18 Apr 2012 |
| Total Posts: 3893 |
|
|
| 01 Mar 2014 01:41 PM |
And it needs to be a color3 value
BackgroundColor3 = color3.new(0/255,0/255,0/255) |
|
|
| Report Abuse |
|
|
|
| 01 Mar 2014 01:41 PM |
but why? ive tried that btw.. and then why does this line work if it has to be BackgroundColor3? script.Parent.BackgroundColor = BrickColor.new(game.Lighting.Teams[game.Players[""..script.Parent.Name..""].Team.Color.Value].Color.Value) this line works.. |
|
|
| Report Abuse |
|
|
YumERAGON
|
  |
| Joined: 18 Apr 2012 |
| Total Posts: 3893 |
|
|
| 01 Mar 2014 01:43 PM |
| wow womb then what's the problem with the script and what do you want it to do |
|
|
| Report Abuse |
|
|
|
| 01 Mar 2014 01:44 PM |
"BrickColor.new(game.Lighting.Teams[game.Players[""..script.Parent.Name..""].Team.Color.Value].Color.Value)"
Looks more complicated than it should be. |
|
|
| Report Abuse |
|
|
|
| 01 Mar 2014 01:46 PM |
well,i have a custom player list in place,but I have these 3 team "guis" and I want it to clone the textlabel(that has player name) into the correct Team Gui so it has like these three textlabels at top of screen,and if the background color is "Really red" then itll parent to the RedTeamGui... |
|
|
| Report Abuse |
|
|
|
| 01 Mar 2014 01:47 PM |
and as a test I ran this in the command bar: bcolors = {teams.BlueTeam.Color,teams.RedTeam.Color,teams.GreenTeam.Color}bc = BrickColor.new(bcolors[1].Value) print (bc.Color) it works..why doesn't this sort of thing work in the script? |
|
|
| Report Abuse |
|
|
|
| 01 Mar 2014 01:51 PM |
woah,i went down fast.. BUMP TO SURVIVEEE |
|
|
| Report Abuse |
|
|
|
| 01 Mar 2014 02:12 PM |
heres what I got now.. Lighting -M --Script PlayerLabel -Script
--in the Label\/ a = 0 wait(2) co = game.Lighting.M:clone() co.Parent = script.Parent function check() tGui = script.Parent.Parent.Parent.Parent.TeamsGui if a <2 then a = 2 wait(1.1) c = script.Parent:clone() bcolors = {"Rb","Rr","Lg"} if c:findFirstChild(bcolors[1]) then c.Parent = tGui.BlueTeam elseif c:findFirstChild(bcolors[2]) then c.Parent = tGui.RedTeam elseif c:findFirstChild (bcolors[3]) then c.Parent = tGui.GreenTeam end end end --ignore underneath this line.. while wait(1) do check() script.Parent.Text = script.Parent.Name.." Kos:" script.Parent.Text = script.Parent.Text..game.Players[""..script.Parent.Name..""].lstats.Kos.Value script.Parent.Text = script.Parent.Text.." Wos:"..game.Players[""..script.Parent.Name..""].lstats.Wos.Value script.Parent.BackgroundColor = BrickColor.new(game.Lighting.Teams[game.Players[""..script.Parent.Name..""].Team.Color.Value].Color.Value) end
in the "M"
co = script.Parent while wait() do if script.Parent.Parent.BackgroundColor3 == Color3.new(BrickColor.new("Really red").Color) then co.Name = "Rr" elseif script.Parent.Parent.BackgroundColor3 == Color3.new(BrickColor.new("Really blue").Color) then co.Name = "Rb" elseif script.Parent.Parent.BackgroundColor3 == Color3.new(BrickColor.new("Lime green").Color) then co.Name = "Lg" end end
the "M"s name wont change.. can someone PLEASE fix this? I am so lost right now... |
|
|
| Report Abuse |
|
|