Transparency script not making everything invisible

I’m currently working on a client-sided transparency script that makes everything except the player’s arms invisible. My issue is that one accessory is not turning completely invisible. I’ve tried using “part:IsA(“Accessory”)” with no luck either.

-- Get player character
local player = game.Players.LocalPlayer
local character = player.Character

-- Function to make body parts transparent
local visibleParts = {
	"RightUpperArm", "RightLowerArm", "RightHand",
	"LeftUpperArm", "LeftLowerArm", "LeftHand"
}

for index, part in ipairs(character:GetDescendants()) do
	if part:IsA("BasePart") and not table.find(visibleParts, part.Name) then
		part.Transparency = 1
	end
end

Does your local script run as soon as you test the game ?

It may benefit to use the CharacterAppearanceLoaded method to make sure that the character had fully loaded in. It runs as soon as the player’s accessories, limbs and etc. have fully loaded.

if not player:HasAppearanceLoaded() then
    player.CharacterAppearanceLoaded:Wait()
end
for _, Limb in ipairs(player.Character:GetDescendants()) do
    if Limb:IsA("BasePart") and Limb.Name:match("Arm") == nil and Limb.Name:match("Hand") == nil then
        Limb.Transparency = 1
    end
end

CharacterAppearanceLoaded (Player) | Documentation - Roblox Creator Hub

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.