Pants not being added to character, even when printing parent says they are there

I’ve been making a character loading system, and I’m really stuck.

Basically, I have an “If” statement inside of a loop looping through data. The prints inside of the “If” statements are being called, and the parent is printing correctly, but the pants are not visible in the explorer.

I don’t know if this is a bug, or if I’m just missing something really obvious that I should have seen, but I’m providing the script that adds the pants and the place file for help.

The Script
--Services
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")

--Remotes
local sendTeleportDataEvent = ReplicatedStorage:WaitForChild("SendTeleportData")

--Modules
local customizationOptionsModule = require(7902172329).CustomizationsTable
print(customizationOptionsModule)

sendTeleportDataEvent.OnServerEvent:Connect(function(player,data)
	local character = player.Character
	local humanoid = character:WaitForChild("Humanoid")
	for section, choice in pairs(data) do
		print(section)
		for _, descendant in pairs(character:GetDescendants())  do
			if descendant:IsA("Shirt") or descendant:IsA("Pants") then
				descendant:Destroy()
			end
		end
		
		if section == "Shirts" then
			local newShirt = Instance.new("Shirt")
			newShirt.ShirtTemplate = customizationOptionsModule.Shirts[choice]
			newShirt.Parent = character
			print(newShirt)
			
		elseif section == "Pants" then
			print("Pants")
			local newPants = Instance.new("Pants")
			print(customizationOptionsModule.Pants[choice])
			newPants.PantsTemplate = customizationOptionsModule.Pants[choice]
			newPants.Parent = character
			print(newPants.Parent)
		end
	end
end)

customization.rbxl (47.5 KB)

Looks fine to me, make sure there’s nothing wrong with the pants side of the required module. When applying a template you must use the assetId of the clothing not the clothingId itself.

Take this for instance, the first would be the clothing ID & the second the asset ID.

Hello, so you’re saying you got a “pants” item to load in by itself and be the one I selected for testing? I had no pants item be created, and that’s the part I was confused about. I would recommend using a default “noob” avatar for this testing as there’s not pants already here.

I believe I used “Clothing IDs” for this, I made sure they worked by pasting them into pants of the dummy you may have seen in the game, and the using the link from the loaded results.

Also, here’s the module:

local module = {}

module.CustomizationsTable = {
	Shirts = {
		"http://www.roblox.com/asset/?id=607785311",
		"http://www.roblox.com/asset/?id=6715054792",
		"http://www.roblox.com/asset/?id=144076357"
	},
	Pants = {
		"http://www.roblox.com/asset/?id=144076759",
		"http://www.roblox.com/asset/?id=382537805",
		"http://www.roblox.com/asset/?id=382538502"
	},
}
return module