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 » Scripters
Home Search
 

Re: Turn all Selections a certain color

Previous Thread :: Next Thread 
JonathanW123 is online. JonathanW123
Joined: 04 Apr 2012
Total Posts: 5832
03 Sep 2015 06:53 PM
how to turn every surfaceselection in the game blue


Falcons for Life
Report Abuse
JonathanW123 is online. JonathanW123
Joined: 04 Apr 2012
Total Posts: 5832
03 Sep 2015 07:00 PM
b


Falcons for Life
Report Abuse
JonathanW123 is online. JonathanW123
Joined: 04 Apr 2012
Total Posts: 5832
03 Sep 2015 07:08 PM
b


Falcons for Life
Report Abuse
JonathanW123 is online. JonathanW123
Joined: 04 Apr 2012
Total Posts: 5832
03 Sep 2015 07:16 PM
b


Falcons for Life
Report Abuse
JonathanW123 is online. JonathanW123
Joined: 04 Apr 2012
Total Posts: 5832
03 Sep 2015 07:41 PM
B


Falcons for Life
Report Abuse
JonathanW123 is online. JonathanW123
Joined: 04 Apr 2012
Total Posts: 5832
03 Sep 2015 07:45 PM
b1


Falcons for Life
Report Abuse
JonathanW123 is online. JonathanW123
Joined: 04 Apr 2012
Total Posts: 5832
03 Sep 2015 07:51 PM
b2


Falcons for Life
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
03 Sep 2015 07:52 PM
By any chance, are they all named the same thing? It would make things far simpler.
Report Abuse
JonathanW123 is online. JonathanW123
Joined: 04 Apr 2012
Total Posts: 5832
03 Sep 2015 07:55 PM
Yep


Falcons for Life
Report Abuse
JonathanW123 is online. JonathanW123
Joined: 04 Apr 2012
Total Posts: 5832
03 Sep 2015 07:56 PM
They're all named SurfaceSelection


Falcons for Life
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
03 Sep 2015 07:59 PM
Run in command bar

while true do
local sel = workspace:FindFirstChild("SurfaceSelection", true);
if sel then
sel.Color3 = Color3.new(0, 0, 1);
sel.Name = "Surface Selection"; -- so we don't cause an infinite loop
else
break;
end
end
Report Abuse
JonathanW123 is online. JonathanW123
Joined: 04 Apr 2012
Total Posts: 5832
03 Sep 2015 08:08 PM
what would be the 3 numbers for red, green, and orange


Falcons for Life
Report Abuse
SenseiWarrior is online. SenseiWarrior
Joined: 09 Apr 2011
Total Posts: 12140
03 Sep 2015 08:10 PM
red = 1,0,0
green = 0,1,0
orange = 0.5,0.5,0
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
03 Sep 2015 08:13 PM
Orange wouldn't quiet be 0.5, 0.5 since orange is red and yellow, but RGB uses red then green (obviously).

You might want to increase the R and/or decrease the G
Report Abuse
SenseiWarrior is online. SenseiWarrior
Joined: 09 Apr 2011
Total Posts: 12140
03 Sep 2015 08:14 PM
Yea maybe 0.75,0.25,0

or 0.6,0.4,0
Report Abuse
Revelted is not online. Revelted
Joined: 02 Nov 2014
Total Posts: 503
03 Sep 2015 08:14 PM
I guess it is in hue...

I was going to say like

game.Workspace.surfaceselection.color3 (0,0,0)

or something
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
03 Sep 2015 08:15 PM
-.- I said quiet instead of quite, I'm an idiot.
Report Abuse
JonathanW123 is online. JonathanW123
Joined: 04 Apr 2012
Total Posts: 5832
03 Sep 2015 08:18 PM
It's not working if I put other numbers in.

What if I wanted workspace.Selection2

anything in there would be red(surfaceselections)

What if I wanted workspace.Selection3

anything in there would be orange(surfaceselections)

and for Selection4, blue


Falcons for Life
Report Abuse
SenseiWarrior is online. SenseiWarrior
Joined: 09 Apr 2011
Total Posts: 12140
03 Sep 2015 08:19 PM
Its not working because now theyre named "Surface Selection", not "SurfaceSelection"

You might need to swap them
Report Abuse
JonathanW123 is online. JonathanW123
Joined: 04 Apr 2012
Total Posts: 5832
03 Sep 2015 08:27 PM
? anyone


Falcons for Life
Report Abuse
JonathanW123 is online. JonathanW123
Joined: 04 Apr 2012
Total Posts: 5832
03 Sep 2015 08:30 PM
b3


Falcons for Life
Report Abuse
instawin is not online. instawin
Joined: 04 Jun 2013
Total Posts: 8777
03 Sep 2015 08:44 PM
does it matter what color they are depending on the number at the end of the name?
if so, could you tell us what you named them?

for example, if a selection box is red, would it be named SelectionBox1? or if it is green, it is named SelectionBox2?
Report Abuse
JonathanW123 is online. JonathanW123
Joined: 04 Apr 2012
Total Posts: 5832
03 Sep 2015 08:54 PM
SelectionBox2 is the model it is in


Falcons for Life
Report Abuse
JonathanW123 is online. JonathanW123
Joined: 04 Apr 2012
Total Posts: 5832
03 Sep 2015 09:05 PM
y


Falcons for Life
Report Abuse
instawin is not online. instawin
Joined: 04 Jun 2013
Total Posts: 8777
03 Sep 2015 09:06 PM
o

local function colorAllBoxes(directory, color3)

local function color(selectionBox, desiredColor3)
selectionBox.SurfaceColor3 = desiredColor3
end

local function rec(currentDirectory)
for i, v in pairs(currentDirectory:GetChildren()) do
if v:IsA("SelectionBox") then
color(v, color3)
elseif v:IsA("Model") then
spawn(function() rec(v) end)
elseif v:IsA("BasePart")
spawn(function() rec(v) end)
end
end
end
rec(directory)

end
colorAllBoxes(workspace.ModelWithSelectionBoxes, Color3.new(your color3))

try that? dunno if it will work, and there is probably a better way to do this
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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