[SOLVED] The code won't read if-then statement

Hello!

So I wanted to make this model to not be transparent using pairs, but the code doesn’t read the if-then statement. I tried to rewrite it many times and it still didn’t work

Here’s the code:

		for _, H in pairs(workspace.Cat:FindFirstChild("Hand2"):GetChildren()) do
			if H:IsA("Part") then -- Code doesn't read this
				H.Transparency = 0
			end
		end

I would appreciate your effort. Thanks!

1 Like

H.Transparency = 1 means transparent, not 0.

My bad, I wanted to say that I want to make the model to not be transparent

change IsA(“part”) to BasePart

It still didn’t work, but thanks for trying

try using :GetDescendants() instead? you never showed how the cats hand2 is setup

2 Likes

Worked! Thank you for helping me

1 Like

Please mark @F0xBirdmansBFF’s post as the Solution, not just SOLVED in the title.

2 Likes