Attempt to index nil with 'Getchildren'

BodyPartFolder is the corresponding body part of the character.

		local bodyPartFolder = items:FindFirstChild("R15ArtistIntent")
		if index then
			table.remove(characterAppearanceInfo.assets, index)
			for i, part in ipairs(bodyPartFolder:GetChildren()) do
				local partInCharacter = character:FindFirstChild(part.Name)
				local bodyPartR15 = partInCharacter and humanoid:GetBodyPartR15(partInCharacter)
				local defaultBodyPart = bodyPartR15 and defaultBodyPartsR15:FindFirstChild(part.Name)
				if defaultBodyPart then
					defaultBodyPart = defaultBodyPart:Clone()
					humanoid:ReplaceBodyPartR15(bodyPartR15, defaultBodyPart)
				end
			end
		else
			for i, asset in ipairs(characterAppearanceInfo.assets) do
				if productInfo.AssetTypeId == asset.assetType.id then
					table.remove(characterAppearanceInfo.assets, i)
				end
			end
			insertToTable(characterAppearanceInfo.assets, productInfo)
			for i, part in ipairs(bodyPartFolder:GetChildren()) do
				local partInCharacter = character:FindFirstChild(part.Name)
				local bodyPartR15 = partInCharacter and humanoid:GetBodyPartR15(partInCharacter)
				if bodyPartR15 then
					humanoid:ReplaceBodyPartR15(bodyPartR15, part)
				end
			end
		end
	end
	humanoid:BuildRigFromAttachments()
	Debris:AddItem(items, 0)
	remoteEvent:FireClient(player, characterAppearanceInfo)
end

I don’t know why it’s not working.

The bodyPartFolder variable is equal to nil in your case (‘FindFirstChild’ may also return a nil), so you need to type something like this:

local bodyPartFolder = items:WaitForChild("R15ArtistIntent")