"attempt to call a brickcolor value"

Hello, I was just practicing scripting since I’m a bit new, my issue is that when I use concaedation for a brickcolor I get an error:
https://gyazo.com/a7cd1aac26b1e4e52d6fdce2d6295227
Heres my script:

function makePart(Size,Position,Shape,Material,Color)
	
local brick = Instance.new("Part")
	
local strings = brick.BrickColor

	brick.Size = Size
	brick.Position = Position
	brick.Shape = Shape
	brick.Anchored = true
	brick.Material = Material
	brick.BrickColor = Color
	brick.Parent = game.Workspace
	
	if brick.BrickColor ==  BrickColor.new("Bright green") then
		print("Brick is" ..strings "the brick is being deleted")
		wait(2)
		brick.Transparency = 1 
	elseif
		brick.BrickColor == BrickColor.new("Bright blue") then
		print(strings "is the color, the brick isn't deleted")
	end
end

print("Making First Part")
wait(1)
makePart(Vector3.new(222, 100, 222), Vector3.new(0, 50, 0),Enum.PartType.Cylinder,Enum.Material.Neon,BrickColor.new("Bright blue"))
print("Making Second Part")
wait(1)
makePart(Vector3.new(222, 100, 222), Vector3.new(0, 150, 0),Enum.PartType.Block,Enum.Material.Grass,BrickColor.new("Bright green"))

I haven’t found any fixes about this on the devforum.

1 Like

You don’t declare correctly connect strings together with variables.
Here is how you correctly do it:

print("Brick is " ..strings.. " the brick is being deleted")

and

print(strings.. " is the color, the brick isn't deleted")

You forgot to concatenate strings and the string

print(strings "is the color, the brick isn't deleted")

into

print(strings .. "is the color, the brick isn't deleted")

since you didn’t put the concatenation, it would be you calling the strings
such as with this example

print("hello")
-- same as
print "hello"

Oh! Thank you both lol. About the second one I actually did do it but forgot to re-type in the script. And the first one thanks both.

Oh wait, I did what Artic told me to do and I still have the error in the output?

Idk but doing
local strings = brick.BrickColor.Name
worked