Script to change character's appearance on spawn not working

if data then
		-- Wait for the Humanoid
		local humanoid = character:WaitForChild("Humanoid")
		local desc = humanoid:GetAppliedDescription()
		
		desc.HeadColor = data.SkinColor
		desc.TorsoColor = data.SkinColor
		desc.LeftArmColor = data.SkinColor
		desc.RightArmColor = data.SkinColor
		desc.LeftLegColor = data.SkinColor
		desc.RightLegColor = data.SkinColor

		desc.Shirt = data.Shirt
		data.Pants = data.Pants

		humanoid:ApplyDescription(desc)
	else