LocalTransparency not effect

Hi, why my accessory is not visible in my hand when I equip it ?

local plr = game:GetService("Players").LocalPlayer
local char = script.Parent

local humanoid = char:FindFirstChild("Humanoid")

repeat task.wait() until humanoid

local camera = workspace.CurrentCamera

plr.CameraMaxZoomDistance = 0.5
camera.FieldOfView = 100
humanoid.CameraOffset = Vector3.new(0,0.5,0)

game:GetService("RunService").Stepped:Connect(function()
	for index, child in pairs(char:GetChildren()) do 
		if child:IsA("Part") or child:IsA("MeshPart") then
			if child.Name ~= "Head" 
				and child.Name ~= "Bandana" 
				and child.Name ~= "Helmet" 
				and child.Name ~= "GlassesEyes"
				and child.Name ~= "GreenEyes"
				and child.Name ~= "Neck"
				and child.Name ~= "Casquette"
			then 
				child:GetPropertyChangedSignal("LocalTransparencyModifier"):Connect(function()
					child.LocalTransparencyModifier = child.Transparency
				end)

				child.LocalTransparencyModifier = child.Transparency
			end
		elseif child:IsA("Accessory") then 
			for k, v in pairs(child:GetChildren()) do 
				if v.Name ~= "ShootPos" 
				then 
					v.LocalTransparencyModifier = v.Transparency
				end
			end 
 		end
	end
end)

Is this done in a localscript?

Yes sure, I followed a tutorial to understand how to do but it does not work for my accessory.

it seems like you’re checking if the name is not the name of the accessory, so the script just does nothing.

I tried before :

21:30:40.044 Current Transparency : %s, (%s) for ‘%s’. 0 1 Cross - Client - FirstPerson:35
21:30:40.044 Current Transparency : %s, (%s) for ‘%s’. 0 0 Cross - Client - FirstPerson:37
21:30:40.044 Current Transparency : %s, (%s) for ‘%s’. 0 1 Cross_Led1 - Client - FirstPerson:35
21:30:40.044 Current Transparency : %s, (%s) for ‘%s’. 0 0 Cross_Led1 - Client - FirstPerson:37
21:30:40.044 Current Transparency : %s, (%s) for ‘%s’. 0 1 Cross_Led2 - Client - FirstPerson:35
21:30:40.044 Current Transparency : %s, (%s) for ‘%s’. 0 0 Cross_Led2 - Client - FirstPerson:37
21:30:40.044 Current Transparency : %s, (%s) for ‘%s’. 0 1 Cross_Led3 - Client - FirstPerson:35
21:30:40.045 Current Transparency : %s, (%s) for ‘%s’. 0 0 Cross_Led3 - Client - FirstPerson:37
21:30:40.045 Current Transparency : %s, (%s) for ‘%s’. 0 1 Cross_Led4 - Client - FirstPerson:35
21:30:40.045 Current Transparency : %s, (%s) for ‘%s’. 0 0 Cross_Led4 - Client - FirstPerson:37
21:30:40.045 Current Transparency : %s, (%s) for ‘%s’. 0 1 Cross_Led5 - Client - FirstPerson:35
21:30:40.045 Current Transparency : %s, (%s) for ‘%s’. 0 0 Cross_Led5 - Client - FirstPerson:37
21:30:40.045 Current Transparency : %s, (%s) for ‘%s’. 0 1 Cross_Led6 - Client - FirstPerson:35
21:30:40.045 Current Transparency : %s, (%s) for ‘%s’. 0 0 Cross_Led6 - Client - FirstPerson:37
21:30:40.045 Current Transparency : %s, (%s) for ‘%s’. 0 1 FirstCanon - Client - FirstPerson:35
21:30:40.045 Current Transparency : %s, (%s) for ‘%s’. 0 0 FirstCanon - Client - FirstPerson:37
21:30:40.045 Current Transparency : %s, (%s) for ‘%s’. 0 1 HandMain - Client - FirstPerson:35
21:30:40.046 Current Transparency : %s, (%s) for ‘%s’. 0 0 HandMain - Client - FirstPerson:37
21:30:40.046 Current Transparency : %s, (%s) for ‘%s’. 0 1 Handle - Client - FirstPerson:35
21:30:40.046 Current Transparency : %s, (%s) for ‘%s’. 0 0 Handle - Client - FirstPerson:37
21:30:40.046 Current Transparency : %s, (%s) for ‘%s’. 0 1 LinkCanons - Client - FirstPerson:35
21:30:40.046 Current Transparency : %s, (%s) for ‘%s’. 0 0 LinkCanons - Client - FirstPerson:37
21:30:40.046 Current Transparency : %s, (%s) for ‘%s’. 0 1 Mag - Client - FirstPerson:35
21:30:40.046 Current Transparency : %s, (%s) for ‘%s’. 0 0 Mag - Client - FirstPerson:37
21:30:40.046 Current Transparency : %s, (%s) for ‘%s’. 0 1 MainCanon - Client - FirstPerson:35
21:30:40.046 Current Transparency : %s, (%s) for ‘%s’. 0 0 MainCanon - Client - FirstPerson:37
21:30:40.046 Current Transparency : %s, (%s) for ‘%s’. 0 1 ThirdCanon - Client - FirstPerson:35
21:30:40.047 Current Transparency : %s, (%s) for ‘%s’. 0 0 ThirdCanon - Client - FirstPerson:37
21:30:40.047 Current Transparency : %s, (%s) for ‘%s’. 0 1 Viseur - Client - FirstPerson:35
21:30:40.047 Current Transparency : %s, (%s) for ‘%s’. 0 0 Viseur - Client - FirstPerson:37
21:30:40.047 Current Transparency : %s, (%s) for ‘%s’. 0 1 Viseur_Led1 - Client - FirstPerson:35
21:30:40.047 Current Transparency : %s, (%s) for ‘%s’. 0 0 Viseur_Led1 - Client - FirstPerson:37
21:30:40.047 Current Transparency : %s, (%s) for ‘%s’. 0 1 Viseur_Led2 - Client - FirstPerson:35
21:30:40.047 Current Transparency : %s, (%s) for ‘%s’. 0 0 Viseur_Led2 - Client - FirstPerson:37
21:30:40.047 Current Transparency : %s, (%s) for ‘%s’. 0 1 Viseur_Led3 - Client - FirstPerson:35
21:30:40.048 Current Transparency : %s, (%s) for ‘%s’. 0 0 Viseur_Led3 - Client - FirstPerson:37
21:30:40.095 Current Transparency : %s, (%s) for ‘%s’. 0 1 Handle - Client - FirstPerson:35
21:30:40.095 Current Transparency : %s, (%s) for ‘%s’. 0 0 Handle - Client - FirstPerson:37


local plr = game:GetService("Players").LocalPlayer
local char = script.Parent

local humanoid = char:FindFirstChild("Humanoid")

repeat task.wait() until humanoid

local camera = workspace.CurrentCamera

plr.CameraMaxZoomDistance = 0.5
camera.FieldOfView = 100
humanoid.CameraOffset = Vector3.new(0,0.5,0)

game:GetService("RunService").Stepped:Connect(function()
	for index, child in pairs(char:GetChildren()) do 
		if child:IsA("Part") or child:IsA("MeshPart") then
			if child.Name ~= "Head" 
				and child.Name ~= "Bandana" 
				and child.Name ~= "Helmet" 
				and child.Name ~= "GlassesEyes"
				and child.Name ~= "GreenEyes"
				and child.Name ~= "Neck"
				and child.Name ~= "Casquette"
			then 
				child:GetPropertyChangedSignal("LocalTransparencyModifier"):Connect(function()
					child.LocalTransparencyModifier = child.Transparency
				end)

				child.LocalTransparencyModifier = child.Transparency
			end
		elseif child:IsA("Accessory") then 
			for k, v in pairs(child:GetChildren()) do 
				if v.Name ~= "ShootPos" 
				then 
					print("Current Transparency : %s, (%s) for '%s'.", v.Transparency, v.LocalTransparencyModifier, v.Name)
					v.LocalTransparencyModifier = v.Transparency
					print("Current Transparency : %s, (%s) for '%s'.", v.Transparency, v.LocalTransparencyModifier, v.Name)
				end
			end 
 		end
	end
end)

But just it detects it but has no effect.

I was thinking about the implementation of the accessory as a model in the character and change the localtransparency in the model.