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: How do you math.random the color of text in a gui?

Previous Thread :: Next Thread 
masterblokz is not online. masterblokz
Joined: 17 Nov 2010
Total Posts: 9517
02 Apr 2013 06:33 PM
Just a question
Report Abuse
snowboarder199 is not online. snowboarder199
Joined: 15 Aug 2009
Total Posts: 2703
02 Apr 2013 06:35 PM
assuming "TextBox" is your variable for the textbox

TextBox.TextColor3 = Color3.new(math.random(1,255), math.random(1,255), math.random(1,255)
Report Abuse
masterblokz is not online. masterblokz
Joined: 17 Nov 2010
Total Posts: 9517
02 Apr 2013 06:36 PM
Thanks. Needs another ) btw
Report Abuse
nairod7 is not online. nairod7
Joined: 26 Mar 2010
Total Posts: 869
02 Apr 2013 06:39 PM
local function RandomColor()
return Color3.new(math.random(), math.random(), math.random())
end

Gui.BackgroundColor3 = RandomColor()

...or directly...

Gui.BackgroundColor3 = Color3.new(math.random(), math.random(), math.random())
Report Abuse
snowboarder199 is not online. snowboarder199
Joined: 15 Aug 2009
Total Posts: 2703
02 Apr 2013 06:43 PM
1) sorry forgot the other ")"

2) hi nairod7
Report Abuse
RyanDolan123 is not online. RyanDolan123
Joined: 05 Mar 2009
Total Posts: 17919
02 Apr 2013 06:57 PM
That, OR this works too:

BrickColor.random().Color

Which is nicer looking and more compact, but the Color3 gives a larger variety of colors

~Kill The Clones is the best game ever to be created on ROBLOX~
Report Abuse
StormRecon is not online. StormRecon
Joined: 15 Aug 2010
Total Posts: 2214
02 Apr 2013 06:59 PM
TextColor3 = Color3.new(math.random1,255)/255, math.random(1,255)/255, math.random(1,255)/255)
Report Abuse
StormRecon is not online. StormRecon
Joined: 15 Aug 2010
Total Posts: 2214
02 Apr 2013 06:59 PM
first math.random is wrong:

math.random(1,255)/255
Report Abuse
nairod7 is not online. nairod7
Joined: 26 Mar 2010
Total Posts: 869
02 Apr 2013 07:09 PM
"BrickColor.random().Color"

Nuuuuuu... I've forgotten that D:
Need 1Gb memory more pl0x
Report Abuse
nairod7 is not online. nairod7
Joined: 26 Mar 2010
Total Posts: 869
02 Apr 2013 07:13 PM
Need 2Gb... I've forgotten why I didn't wrote that... Because there are less colors with BrickColor.random().Color than Color3.new(math.random(),math.random(),math.random())
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