I keep getting a error saying it should be Color3 but, its a brickcolor?
(Tittle explains most)
Its a textbutton, which has a BrickColorValue in it, named Color and a script in it.
The error says: bad argument #1 to 'new' (Color3 expected, got userdata)
There's bricks in workspace named "Lego Brick" with a bool value inside of them, the script that generates them sets the bool value to true.
The script is:
01 | script.Parent.MouseButton 1 Click:connect( function () |
02 | local color = script.Parent.Color |
03 | local brick = game.Workspace:GetChildren() |
04 | for i,v in pairs (brick) do |
05 | if v.Name = = "Lego Brick" then |
06 | if v.ScriptGeneratedBrick.Value = = true then |
07 | v.BrickColor = BrickColor.new(color.Value) |
- Line 7 is where i get the error -