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 » Scripting Helpers
Home Search
 

im confused..

Previous Thread :: Next Thread 
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
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
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
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
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
01 Mar 2014 01:29 PM
10 views..no replys..
Report Abuse
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
01 Mar 2014 01:37 PM
sigh..
bump?
please help..
Report Abuse
YumERAGON is not online. YumERAGON
Joined: 18 Apr 2012
Total Posts: 3893
01 Mar 2014 01:40 PM
BackgroundColor3
Report Abuse
YumERAGON is not online. 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
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
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 is not online. 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
Duelingwarlord is not online. Duelingwarlord
Joined: 15 Feb 2010
Total Posts: 22333
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
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
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
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
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
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
01 Mar 2014 01:51 PM
woah,i went down fast..
BUMP TO SURVIVEEE
Report Abuse
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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