Help with 3D text

I’m trying to make a system that creates “3D text labels”, there’s a part corresponding to each letter in the alphabet, however some of the letters are overlapping each other and aren’t rotated correctly.

Current code:

return function(letters, origin, properties)
	local letterSpacing = 1.5;
	local parts = {};
	
	for i = 1, #letters do
		local corresponding = script:FindFirstChild(letters:sub(i, i));
		
		if corresponding ~= nil then
			table.insert(parts, corresponding);
		end;
	end;
	
	local model = Instance.new("Model")
	model.Name = letters:match("%s") and "Sentence" or "Word";
	
	local boundingBox = Instance.new("Part")
	boundingBox.Anchored = true;
	boundingBox.CanCollide = false;
	boundingBox.Transparency = 1;
	
	boundingBox.Parent = model;
	
	local previous = parts[1];
	for _, part in pairs(parts) do
		for property, value in pairs(properties) do
			part[property] = value;
		end;
		
		part.Parent = model;
		part.Position = Vector3.new(
			letterSpacing*(#model:GetChildren() - 1) + previous.Size.X, 0, 0);
		previous = part;
	end;
	
	boundingBox.Position = model:GetBoundingBox().Position;
	boundingBox.Size = model:GetExtentsSize();
	
	model.PrimaryPart = boundingBox;
	model:SetPrimaryPartCFrame(CFrame.new(origin));
	
	return model;
end;

It first takes the string piece by piece to find which part they correspond to.
It creates a model and bounding box, so it can later be positioned to the origin.
Each letter is spaced like this:
(letterSpacing * (number of letters in model - 1) + previousPart.Size.X, 0, 0)

Theres a couple of potential problems I can think of:

  1. Your letters could be not rotated correctly simply because theyre rotated to different rotations after the fact, could be fixed by simply saying “rotation = Vector3.new(0,0,0)” or something like that
  2. If this doesnt work your letters might be rotated incorrectly in terms of the model itself, so if theyre all at a rotation of 0,0,0 but theyre not rotated correctly still. This would have to be fixed by whoever made the letters, or you could just give each part a vector3 value with an add-on rotation offset but thats a lot of work if we’re being honest

The rotation problem could also cause spacing issues if the “X” component of the size isnt always the side-to-side component, but is up or back
This would cause massive problems

So the two things I would check first is:
Are all of the parts have the same orientation value? If not, give them the same orientation value
Are they still mis-rotated? Then get the person who made your models (if there is one) to fix it, or perhaps theres a way you or someone else could try to fix the rotation of the parts in the model itself. This would depend if its made of unions, meshes…