AddAccessory() doesn't weld the accessory to the character

When I try using :AddAccessory(), it adds the accessory in the character, however it doesn’t weld it to the character.

The explorer tab:
Children

The part of the script responsable for adding the accessory:

uis.InputBegan:Connect(function(input, gameProcessed)
	
	if input.KeyCode == Enum.KeyCode.Z and not gameProcessed then
		
		enabled = true
		--gui.Enabled = true
		
		--player.CameraMode = Enum.CameraMode.LockFirstPerson
		--camera.FieldOfView = 20
		
		local accessory = script.Binoculars:Clone()
		humanoid:AddAccessory(accessory)
		
		holdAnimation:Play()
		
	end
end)

Please help!

Just weld it manually. This should work,

uis.InputBegan:Connect(function(input, gameProcessed)
	
	if input.KeyCode == Enum.KeyCode.Z and not gameProcessed then
		
		enabled = true
		--gui.Enabled = true
		
		--player.CameraMode = Enum.CameraMode.LockFirstPerson
		--camera.FieldOfView = 20
		
		local accessory = script.Binoculars:Clone()
		humanoid:AddAccessory(accessory)
        local weld = Instance.new('Weld', accessory.Handle)
        weld.Part0, weld.Part1 = accessory, character.Head
              
		
		holdAnimation:Play()
		
	end
end)

I think that’ll work, thanks for the answer.

I reviewed the problem again today and I found out that you can only use AddAccessory() in normal scripts, not local ones.