Setting Transparency not working

game.Players.PlayerAdded:Connect(function(plr)
	plr.CharacterAdded:Connect(function(Cha)
		Cha.LeftFoot.Transparency, Cha.LeftLowerLeg.Transparency, Cha.RightFoot.Transparency, Cha.RightLowerLeg.Transparency = 1,1,1,1
	end)
end)

If there is something wrong with my code please let me know, I’m very confused by this.

I don’t get any Errors in the Output

1 Like

Hint:

local a, b, c, d = 1
print(a, b, c, d) -- 1, nil nil, nil
3 Likes

Actually, it’s = 1,1,1,1, I copied it wrong.

if you test the Repro you’ll see that ALL parts doesn’t go transparent

Adding a fudge wait(1) fixes it.

game.Players.PlayerAdded:Connect(function(plr)
	plr.CharacterAdded:Connect(function(Cha)
		wait(1)
		Cha.LeftFoot.Transparency, Cha.LeftLowerLeg.Transparency, Cha.RightFoot.Transparency, Cha.RightLowerLeg.Transparency = 1,1,1,1
	end)
end)

The code is probably executing before the appearance is loaded.

Use CharacterAppearanceLoaded instead.

game.Players.PlayerAdded:Connect(function(plr)
	plr.CharacterAppearanceLoaded:Connect(function(Cha)
		Cha.LeftFoot.Transparency, Cha.LeftLowerLeg.Transparency, Cha.RightFoot.Transparency, Cha.RightLowerLeg.Transparency = 1,1,1,1
	end)
end)
1 Like

Thanks that solved it, do you know why this is happening? I don’t recall it happening before.

Possibly related.

2 Likes