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 » Club Houses » Let's Make a Deal
Home Search
 

Re: Roblox studio question

Previous Thread :: Next Thread 
AlwaysDrowsy is not online. AlwaysDrowsy
Joined: 27 Jun 2012
Total Posts: 29588
29 Jul 2015 09:07 PM
Is it possible for me to do something that will recolor everything in my game that is a certain color, and make it another?

I have a game and it's colored blue and I want to change all the blue to a different color without individually changing it all.

It is all the same color blue.
Report Abuse
TY909rox is not online. TY909rox
Joined: 25 Apr 2011
Total Posts: 28912
29 Jul 2015 09:09 PM
Select all, then go to color and color it
Report Abuse
AlwaysDrowsy is not online. AlwaysDrowsy
Joined: 27 Jun 2012
Total Posts: 29588
29 Jul 2015 09:11 PM
That would color everything though.

It's a fort. Some of it is gray, some is blue.

I want to make the blue into purple, but keep the gray as it is.
Report Abuse
MillerSoRock is not online. MillerSoRock
Joined: 27 Feb 2010
Total Posts: 4888
29 Jul 2015 09:12 PM
Scripting.
Report Abuse
AlwaysDrowsy is not online. AlwaysDrowsy
Joined: 27 Jun 2012
Total Posts: 29588
29 Jul 2015 09:12 PM
@Miller - Can you elaborate?
Report Abuse
zombiefied is not online. zombiefied
Joined: 05 Apr 2008
Total Posts: 33530
29 Jul 2015 09:12 PM
>select
>same
>color
Report Abuse
ClashofChaos is not online. ClashofChaos
Joined: 18 Sep 2012
Total Posts: 13534
29 Jul 2015 09:13 PM
ye its possible mouse over only the bricks u want then choose the color u want
Report Abuse
EdonSolo is not online. EdonSolo
Joined: 20 Dec 2010
Total Posts: 753
29 Jul 2015 09:14 PM
why is this on lmad?
Report Abuse
MillerSoRock is not online. MillerSoRock
Joined: 27 Feb 2010
Total Posts: 4888
29 Jul 2015 09:16 PM
Bricks = script.Parent:GetChildren() -- Make sure that all the bricks are here.

for i=1,#Bricks do
if Bricks[i].BrickColor == BrickColor.new("Bright blue") then -- Color that it is.
Bricks[i].BrickColor = BrickColor.new("Magenta") -- Color you want it to be.
end
end
Report Abuse
zombiefied is not online. zombiefied
Joined: 05 Apr 2008
Total Posts: 33530
29 Jul 2015 09:17 PM
oldColor = "Black" newColor = "Institutional white" for i, v in pairs(workspace:GetChildren()) do if (v:IsA("BasePart") and (v.BrickColor == BrickColor.new(oldColor)) then v.BrickColor = BrickColor.new(newColor) end end
Report Abuse
L2000 is not online. L2000
Joined: 03 Apr 2008
Total Posts: 77448
29 Jul 2015 09:21 PM
Above two ^ wouldn't really work
If you have it all grouped together as different models they won't be found

Instead use this

local from = BrickColor.new("Bright blue")
local to = BrickColor.new("Bright purple")

function check(par)
for i,v in pairs(par:GetChildren()) do
if (v:IsA("Part") and v.BrickColor == from) then
v.BrickColor = to
end
check(v)
end
end

check(workspace)


Change from and to

cats r lyf
Report Abuse
zombiefied is not online. zombiefied
Joined: 05 Apr 2008
Total Posts: 33530
29 Jul 2015 09:22 PM
@l2k

that one will break
Report Abuse
L2000 is not online. L2000
Joined: 03 Apr 2008
Total Posts: 77448
29 Jul 2015 09:25 PM
Why would it break? ^

cats r lyf
Report Abuse
AlwaysDrowsy is not online. AlwaysDrowsy
Joined: 27 Jun 2012
Total Posts: 29588
29 Jul 2015 09:26 PM
Time to try them all!

Thanks guys.
Report Abuse
MillerSoRock is not online. MillerSoRock
Joined: 27 Feb 2010
Total Posts: 4888
29 Jul 2015 09:28 PM
@L2
Yeah, why wouldn't he group them together? Because with yours any brick of that color will be changed.

Yeah, you're zoed.
Report Abuse
AlwaysDrowsy is not online. AlwaysDrowsy
Joined: 27 Jun 2012
Total Posts: 29588
29 Jul 2015 09:29 PM
The next question is, how do I start the script once I made it?
Report Abuse
L2000 is not online. L2000
Joined: 03 Apr 2008
Total Posts: 77448
29 Jul 2015 09:30 PM
Yes exactly

"recolor everything in my game"
> everything

cats r lyf
Report Abuse
zombiefied is not online. zombiefied
Joined: 05 Apr 2008
Total Posts: 33530
29 Jul 2015 09:30 PM
command bar
Report Abuse
AlwaysDrowsy is not online. AlwaysDrowsy
Joined: 27 Jun 2012
Total Posts: 29588
29 Jul 2015 09:31 PM
L2K's worked like a charm.

Thanks!
Report Abuse
L2000 is not online. L2000
Joined: 03 Apr 2008
Total Posts: 77448
29 Jul 2015 09:31 PM
If you're in Edit mode, the top bar should have a Play button (Either green or blue, blue will have a character on it)

If its blue click beneath and then click the green one
If its green click that

Then the script will run


If its not edit mode / already running highlight the script and check Disabled in properties, then uncheck


cats r lyf
Report Abuse
zombiefied is not online. zombiefied
Joined: 05 Apr 2008
Total Posts: 33530
29 Jul 2015 09:35 PM
@op

ya keep using his and enjoy ur broken game soon!
Report Abuse
AlwaysDrowsy is not online. AlwaysDrowsy
Joined: 27 Jun 2012
Total Posts: 29588
29 Jul 2015 09:36 PM
@Zom - I really know nothing about scripting and game building.

How is it going to break?
Report Abuse
lostend is not online. lostend
Joined: 21 Aug 2011
Total Posts: 8265
29 Jul 2015 09:37 PM
put this in command bar

local scan=function(w,color)
for i,v in next,w:GetChildren() do
if tostring(v.BrickColor):lower():match('blue') then
v.BrickColor=color
if #v:GetChildren()>0 then
scan(v)
end
end
end
end

scan(workspace,BrickColor.new('Magenta'))
Report Abuse
L2000 is not online. L2000
Joined: 03 Apr 2008
Total Posts: 77448
29 Jul 2015 09:38 PM
I suppose its possible that if u get like a billion models it'll have a stack overflow
But like even if u go up to like 5k models nothing would rlly happen

cats r lyf
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Club Houses » Let's Make a Deal
   
 
   
  • 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