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! Again!

Previous Thread :: Next Thread 
Paingred is not online. Paingred
Joined: 23 Oct 2008
Total Posts: 1138
21 Sep 2011 12:48 AM
I'm now trying to take it up a bit and make a disco floor, but I have no idea how to randomize brickcolor! Is it possible? If so, someone please tell me how!
Report Abuse
natedogith1 is not online. natedogith1
Joined: 09 Aug 2008
Total Posts: 578
21 Sep 2011 12:52 AM
BrickColor.new(Color3.new(math.random(0,255)/255,math.random(0,255)/255,math.random(0,255)/255))
Report Abuse
Paingred is not online. Paingred
Joined: 23 Oct 2008
Total Posts: 1138
21 Sep 2011 12:54 AM
Thanks!
Report Abuse
Paingred is not online. Paingred
Joined: 23 Oct 2008
Total Posts: 1138
21 Sep 2011 12:57 AM
No, that doesn't work...
Maybe I should leave randomising for when i'm more experienced...
Report Abuse
natedogith1 is not online. natedogith1
Joined: 09 Aug 2008
Total Posts: 578
21 Sep 2011 12:59 AM
what do you mean it doesn't work?
Report Abuse
Paingred is not online. Paingred
Joined: 23 Oct 2008
Total Posts: 1138
21 Sep 2011 03:06 AM
i put it in the brick, and the brickcolor wasn't changing!
Report Abuse
CyberHusky is not online. CyberHusky
Joined: 03 May 2010
Total Posts: 67
21 Sep 2011 09:43 AM
You did put:

script.Parent.BrickColor.new(Color3.new(math.random(0,255)/255,math.random(0,255)/255,math.random(0,255)/255))

In it right? Don't mean to be insulting, I just don't know your scripting knowledge level.

CyberHusk Productions - CEO
Report Abuse
grimm343 is not online. grimm343
Joined: 18 Sep 2008
Total Posts: 2796
21 Sep 2011 09:52 AM
It may be easier to do sometihng a little smaller. :o

db = true
script.Parent.Touched:connect(function(hit)
if not db then return end
db = false
local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
if plr then
script.Parent.BrickColor = BrickColor.Random()
end
wait(0.5)
db = true
end)


Put this text as the source of a script (contents).

Drag that script into the brick you want to change colors.

Whenever a player walks into it, it will change to a random color.
Report Abuse
grimm343 is not online. grimm343
Joined: 18 Sep 2008
Total Posts: 2796
21 Sep 2011 09:53 AM
something*

Also, by smaller, I meant this part..

script.Parent.BrickColor = BrickColor.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