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
 

Re: Help on this..

Previous Thread :: Next Thread 
juanse71 is not online. juanse71
Joined: 12 Jan 2009
Total Posts: 6784
02 Jan 2014 11:49 PM
Diamonbladee gave me this (thanks)

--

color = {26,1,199,23,21,37,104,9,194}
script.Parent.Touched:connect(function(hit)
if hit.Name == "Brick" then
local x = math.random(1,#color)
hit.BrickColor = BrickColor.new(x)
end
end)


--

How do i make it so all the bricks have to be the same color..
Report Abuse
juanse71 is not online. juanse71
Joined: 12 Jan 2009
Total Posts: 6784
02 Jan 2014 11:52 PM
Sometimes i feel like my thread is not even visible to people
Report Abuse
XtremeTemper is not online. XtremeTemper
Joined: 02 Mar 2012
Total Posts: 1774
02 Jan 2014 11:55 PM
color = {26,1,199,23,21,37,104,9,194}
script.Parent.Touched:connect(function(hit)
if hit.Name == "Brick" then
if hit.BrickColor == "COLOR HERE" then
x = math.random(1,#color)
hit.BrickColor = BrickColor.new(x)
end
end
end)

--Give that a shot, I rushed btw.
Report Abuse
DiamondBladee is not online. DiamondBladee
Joined: 24 Feb 2013
Total Posts: 3527
02 Jan 2014 11:56 PM
color = {26,1,199,23,21,37,104,9,194}
script.Parent.Touched:connect(function(hit)
local x = math.random(1,#color)
local list = hit.Parent:GetChildren()
for i=1, #list do
if list[i].Name == "Brick" then
list[i].BrickColor = BrickColor.new(x)
end
end
end
end)






~DiamondBladee~
Report Abuse
juanse71 is not online. juanse71
Joined: 12 Jan 2009
Total Posts: 6784
02 Jan 2014 11:57 PM
color = {26,1,199,23,21,37,104,9,194}
script.Parent.Touched:connect(function(hit)
if hit.Name == "Brick" then
if hit.BrickColor == "COLOR HERE" then
x = math.random(1,#color)
hit.BrickColor = BrickColor.new(x)
end
end
end)

--

Theres 2 color commands...

color = {26,1,199,23,21,37,104,9,194}
and
if hit.BrickColor == "COLOR HERE" then

What do i put in color here...if it shows the color codes already
Report Abuse
juanse71 is not online. juanse71
Joined: 12 Jan 2009
Total Posts: 6784
02 Jan 2014 11:58 PM
Let me try diamonds
Report Abuse
juanse71 is not online. juanse71
Joined: 12 Jan 2009
Total Posts: 6784
03 Jan 2014 12:00 AM
01:00:02.814 - Workspace.Model.Sensor.Script:13: ')' expected (to close '(' at line 4) near 'end'
Report Abuse
DiamondBladee is not online. DiamondBladee
Joined: 24 Feb 2013
Total Posts: 3527
03 Jan 2014 12:05 AM
Whoops, my apologies:


color = {26,1,199,23,21,37,104,9,194}
script.Parent.Touched:connect(function(hit)
local x = math.random(1,#color)
local list = hit.Parent:GetChildren()
for i=1, #list do
if list[i].Name == "Brick" then
list[i].BrickColor = BrickColor.new(x)
end
end
end)


~DiamondBladee~
Report Abuse
blazinskittles is not online. blazinskittles
Joined: 08 Jun 2010
Total Posts: 8137
03 Jan 2014 12:14 AM
Delete system 32.
Report Abuse
juanse71 is not online. juanse71
Joined: 12 Jan 2009
Total Posts: 6784
03 Jan 2014 12:15 AM
How much can i thanks you..omg
Report Abuse
DiamondBladee is not online. DiamondBladee
Joined: 24 Feb 2013
Total Posts: 3527
03 Jan 2014 12:18 AM
@blazin

That's why he has a 64-bit system c:<

~DiamondBladee~
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