Why is it still printing these?

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

Explain what happened. Don’t just say it didn’t work. Say what happened? Please explain

Can you show the output and the explorer view of stand?

What is the thing that doesn’t work?

Explain more man what happened in the output???

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.

I will give you the code then. Give me a second

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 :slight_smile:

Add a little task.wait() before making it transparent?

I wanted to write that man. You beat me

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()

lol because it is too easy i guess? It’s alright you still have other chances :slight_smile:

is there a way to do it without the “else” statement?

why dont you want the else statement?

I’m tweening the transparency.

i just set the transparency normally in the sample code to make the task more clear.

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 :slight_smile:

nevermind, i found the solution that best fits my problem. thanks for your time.

1 Like

please don’t set your own post as solution. Set the post from someone else that worked the best as the solution please. Thanks! :slight_smile: