for i, v in script.Parent:GetDescendants() do
if v:IsA("Folder") or v:IsA("Model") or v:IsA("SpecialMesh") or v:IsA("WeldConstraint") or v:IsA("TouchTransmitter") or v:IsA("Script") or v.Name == "Cloud" then continue end
print(v.Name)
for ii, CLOUD_MESH in script.Parent:GetChildren() do
if CLOUD_MESH:IsA("Folder") or CLOUD_MESH:IsA("Model") or CLOUD_MESH:IsA("SpecialMesh") or CLOUD_MESH:IsA("WeldConstraint") or CLOUD_MESH:IsA("TouchTransmitter") or CLOUD_MESH:IsA("Script") or CLOUD_MESH.Name == "CloudPlatform" then continue end
print(CLOUD_MESH.Name)
end
end
I tried to make two separate variables (v and CLOUD_MESH) using two for loops. I tested this code and it only printed v. Does the if statement for the first for loop carry on to the second for loop?
I suspect that the if statement on line 5 of your code sample is excluding all possible values in the second loop. If you remove the if statement, do things output?
Okay, something is a bit wrong? Whenever I step on a cloud it’s supposed to change that cloud’s color but instead it changes the certain cloud’s color (in the screenshot)