while  wait()  do	
	for  i,  v  in  pairs(workspace:GetDescendants())  do
		for  i,  x  in  pairs(v:GetDescendants())  do 
			if  v:IsA("BasePart")  and  v.Anchored  ==  false  then
				script.Parent.Text  =  "Unanchored BPs located."
				script.Parent.TextColor3  =  Color3.new(255  /  255,  0  /  255,  0  /  255)
				break 
			end
			if  v:IsA("BasePart")  and  v.Anchored  then
				script.Parent.Text  =  "All BPs are anchored."
				script.Parent.TextColor3  =  Color3.new(46  /  255,  255  /  255,  0  /  255)
				end  
			end 
		end  
	end
end

So this is a text that says if parts in workspace are unanchored or not, but I don't want it to tell me they're unanchored if they have welds in them how would i do that?

2 comments

0

Break out of all 3 loops.

0

while wait() do is bad code. Use while true do. It's clearer.