Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I stop the script from saying parts with welds are unanchored?

Asked by 5 years ago
Edited by User#24403 5 years ago

lua 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?

0
Break out of all 3 loops. DeceptiveCaster 3761 — 5y
0
while wait() do is bad code. Use while true do. It's clearer. User#24403 69 — 5y

Answer this question