I am trying to remove all parts of a certain colour, but the script is not working. This is the script (Normal script in the workspace):
function Colour_Delete(Colour)
for index, child in pairs(workspace:GetChildren()) do
if child.ClassName:IsA("Part") then
if child.BrickColor == Colour then
child:remove()
print (child.."Removed")
wait(.1)
end
end
end
end
Colour_Delete("Dark stone grey")
This is the output:
19:32:12.579 - Workspace.Side_Stoning:3: attempt to call method 'IsA' (a nil value) 19:32:12.580 - Stack Begin 19:32:12.581 - Script 'Workspace.Side_Stoning', Line 3 - global Colour_Delete 19:32:12.581 - Script 'Workspace.Side_Stoning', Line 13 19:32:12.582 - Stack End

2 comments
Thanks, however, unions and negate parts aren't under the BasePart, upvoted.
Really? They should be.