So I’m trying to print out certain parts of a model, and I don’t want other parts of it to be visible. Why doesn’t this work??
for i,v in pairs(stand:GetDescendants()) do
if v.ClassName == "Part" then
if v.Name ~= "Right Arm2" or v.Name ~= "Right Arm3" or v.Name ~= "Left Arm2" or v.Name ~= "Left Arm3" then
v.Transparency = 0
end
end
end
Every descendant with the ClassName of “Part” turned visible. I don’t want the descendants named “Right Arm2”, “Right Arm3”, “Left Arm2”, and “Left Arm3” to be visible.
for i,v in pairs(stand:GetDescendants()) do
if v.ClassName == "Part" then
if v.Name ~= "Right Arm2" or v.Name ~= "Right Arm3" or v.Name ~= "Left Arm2" or v.Name ~= "Left Arm3" then
v.Transparency = 0
else
v.Transparency = 1
end
end
end
If it worked then it would be appreciated to be set as solution
No the problem is that he only set some pats to visible but other parts he didn’t do anything about it. That’s why. Adding task.wait() will cause an error. It will work perfectly if there is no task.wait()
If you don’t want the else statement, then do this:
for i,v in pairs(stand:GetDescendants()) do
if v.ClassName == "Part" then
if v.Name ~= "Right Arm2" or v.Name ~= "Right Arm3" or v.Name ~= "Left Arm2" or v.Name ~= "Left Arm3" then
v.Transparency = 0
end
if v.Name == "Right Arm2" or v.Name == "Right Arm3" or v.Name == "Left Arm2" or v.Name == "Left Arm3" then
v.Transparency = 1
end
end
end
If it worked then it would be appreciated to be set as solution