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: BrickColors

Previous Thread :: Next Thread 
Peaceless is not online. Peaceless
Joined: 24 Dec 2012
Total Posts: 31
28 Dec 2012 06:34 PM
Colors = {
BrickColor.White(),
BrickColor.Black()
}

local Inew = Instance.new
local mran = math.random

while wait(1) do
local P = Inew("Part", Workspace.BlackAndWhite)
P.Anchored = true
P.CanCollide = false
P.BrickColor = Colors[math.random(#Colors)] -- line 13
P.CFrame = CFrame.new(mran(100), mran(100), mran(100))
P.Size = Vector3.new(1,1,1)
P.Shape = "Ball"
end
------------------------------------------------------
Okay, so this works, but not exactly how I want.
Firstly, the colors are not what I want, I'd prefer yellow and grey, but no sure how to put that because "Black" and "White" are just one word colors.
Second, on line 13 it chooses randomly, I don't exactly want it random, but for every other brick to be black, or white.

Thanks in advanced,
Peaceless
Report Abuse
Jonah13249 is not online. Jonah13249
Joined: 09 Oct 2009
Total Posts: 2105
28 Dec 2012 06:43 PM
while true do
local yellow = Instance.new("Part", workspace)
yellow.Anchored = true
yellow.CanCollide = false
yellow.BrickColor = BrickColor.new("Bright yellow")
yellow.CFrame = CFrame.new(math.random(100),math.random(100),math.random(100))
yellow.Size = Vector3.new(1, 1, 1)
yellow.Shape = "Ball"
wait(1)
local grey = Instance.new("Part", workspace)
grey.Anchored = true
grey.CanCollide = false
grey.BrickColor = BrickColor.new("Medium stone grey")
grey.CFrame = CFrame.new(math.random(100), math.random(100), math.random(100))
grey.Size = Vector3.new(1, 1, 1)
grey.Shape = "Ball"
wait(1)
end


~ṡсɾïρτïṉģ hεlρεɾṡ ۩ lυαlεαɾṉεɾṡ ④ øƒвќṃṿј~ ღ ▂▃▅▆█ρεώḋïερïε☄сυτïερïε█▆▅▃▂ღ 【▬】
Report Abuse
Peaceless is not online. Peaceless
Joined: 24 Dec 2012
Total Posts: 31
28 Dec 2012 06:45 PM
Ah okay.
I didn't realize how simple it'd be.
Report Abuse
Jonah13249 is not online. Jonah13249
Joined: 09 Oct 2009
Total Posts: 2105
28 Dec 2012 06:47 PM
Lol, it's VERY simple. xD

~ṡсɾïρτïṉģ hεlρεɾṡ ۩ lυαlεαɾṉεɾṡ ④ øƒвќṃṿј~ ღ ▂▃▅▆█ρεώḋïερïε☄сυτïερïε█▆▅▃▂ღ 【▬】
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