local NewBrickColor = BrickColor.new('Lime green')
for i,v in pairs(folder:GetChildren()) do
	if v.BrickColor == NewBrickColor then
		playerval.Value = #v
	end
end

Small error, I realise the issue is with Line 4, but I don't understand how that's an issue. The script showing, is a "counting colored brick" script, basically check's inside the folder if the selected Bricks are "NewBrickColor", if so it counts and returns the value.

If there's a way around this and someone would like to help, that would be greatly appreciated.

4 comments

0

What is line 4 supposed to do?

0

Line four is supposed to return the counted amount of colored Bricks, as in if Brick (A,B) are "NewBrickColor", then the value is 2, if its just (A) then it returns 1

0

Right now you're setting the value of playerval to the length of an object, which objects don't have lengths. Instead, you could use playerval.Value as a counter by replacing line 4 with "playerval.Value = playerval.Value + 1"

0

Okay i'll try this!