I'm having a ton of trouble on this but I'm ALMOST there!! The brick isn't turning colors, and after looking at the Wiki for a while, I can't find anything!
bag = script.parent.parent.parent function onClick() bag.brickColor = Color3.new(25,25,255) end script.Parent.MouseButton1Click:connect(onClick)
Bag is a Handle, a suitcase, and it is supposed to change colors when you click a color on this GUI!
Almost everything in this script is wrong.
Read the output and it will tell you that things are amiss.
You must use .Parent
instead of .parent
. You must use .BrickColor
instead of .brickColor
.
A Color3
is not a BrickColor
. BrickColors are constructed by their names. E.g.,
bag.BrickColor = BrickColor.new("Bright blue")
Color3.new
takes parameters between 0 and 1, not 0 and 255. You must scale them down. Thus Color3.new(0.1, 0.1, 1)
is approximately the color you're asking for. You can convert a Color3 value into a BrickColor using the BrickColor constructor:
bag.BrickColor = BrickColor.new( Color3.new(0.1, 0.1, 1) )