Add avatar clothes to viewmodel

helloo the problem i have with this is that it cant apply the players clothes on the arm of the viewmodel, there was a time that it worked but the problem was that you can see 2 tools while in first person, fixed it by making it invisible but now the clothes wont work anymore.

the code is here:
local player = game.Players.LocalPlayer
local char = player.Character or player.CharacterAdded:Wait()
local ViewModel = game.ReplicatedStorage.ViewModel:Clone()

local root = ViewModel:FindFirstChild(“HumanoidRootPart”)
local torso = ViewModel:FindFirstChild(“Torso”)

if root and torso then
local weld = Instance.new(“WeldConstraint”)
weld.Part0 = root
weld.Part1 = torso
weld.Parent = torso
torso.CFrame = root.CFrame
end

local humanoid = Instance.new(“Humanoid”)
humanoid.Name = “FakeHumanoid”
humanoid.Parent = ViewModel

local function CloneShirt()
local shirt = char:FindFirstChildOfClass(“Shirt”)
if shirt then
local shirtClone = shirt:Clone()
shirtClone.Parent = ViewModel
end
end

char:WaitForChild(“Head”)
char:WaitForChild(“Shirt”)
char:WaitForChild(“Torso”)

CloneShirt()

for _, armName in {“Left Arm”, “Right Arm”} do
local sourceArm = char:FindFirstChild(armName)
local vmArm = ViewModel:FindFirstChild(armName)
if sourceArm and vmArm then
vmArm.Color = sourceArm.Color
vmArm.Material = sourceArm.Material
end
end

local tool = char:WaitForChild(“Phone”)

local function MakeToolInvisible()
if tool and tool:FindFirstChild(“Handle”) then
tool.Handle.Transparency = 1
end
end

local function RestoreToolVisibility()
if tool and tool:FindFirstChild(“Handle”) then
tool.Handle.Transparency = 0
end
end

local function IsInFirstPerson()
local camera = game.Workspace.CurrentCamera
local head = char:FindFirstChild(“Head”)
if camera and head then
local cameraPosition = camera.CFrame.p
local headPosition = head.Position
local distance = (cameraPosition - headPosition).Magnitude
return distance < 1
end
return false
end

local function UpdateToolVisibility()
if IsInFirstPerson() then
MakeToolInvisible()
else
RestoreToolVisibility()
end
end

UpdateToolVisibility()

game:GetService(“RunService”).RenderStepped:Connect(function()
UpdateToolVisibility()
end)