of     1   

michaelh0042
#139505441Monday, July 07, 2014 5:33 AM GMT

local part=Workspace.Color function onTouch(Color) script.Parent.BrickColor = BrickColor.new(math.random()) end part.Touched:connect(onTouch) Just noticed a bug or something. It only randomizes two colours (grey and white) Pardon me if its obvious or something I haven't used Lua in 4 years.
michaelh0042
#139505522Monday, July 07, 2014 5:34 AM GMT

Hopefully my scripting isn't too rusty to the point where this is just a obvious mistake.
Brick_man
#139505527Monday, July 07, 2014 5:34 AM GMT

if you want a random color, do BrickColor.random() instead. Colors have a number value, so it makes sense that the numbers within (0-1) are either white or grey.
michaelh0042
#139505634Monday, July 07, 2014 5:36 AM GMT

lol *facepalm* thanks
blox6137
#139512194Monday, July 07, 2014 7:13 AM GMT

If you want to use your original code, but have random colors, try this: == local part=Workspace.Color function onTouch(Color) script.Parent.BrickColor = BrickColor.new(math.random(), math.random(), math.random()) end part.Touched:connect(onTouch) == System32? Delete it.
blox6137
#139512250Monday, July 07, 2014 7:14 AM GMT

You have to iterate the math.random a couple of times. System32? Delete it.

    of     1