Strange Problems with WeldConstraints

  1. What do you want to achieve?
    Currently in my game, players place “Cells” (Parts) to build their own character. I weldConstraint these parts to the main one, titled mainBCell. When I weldConstraint them all together, I get many problems. Here is my code right now:
		local Canvases = workspace:WaitForChild("Canvases")
		local canvas = Canvases:FindFirstChild(tostring(pos.Value))
		local objects = canvas:WaitForChild("CanvasObjects")
		local descendents = objects:GetChildren()
		local mainBCell = objects.mainBCell
		mainBCell.Parent = playerCells
		for index, cell in pairs(descendents) do
			if cell:IsA("BasePart") and cell.Name ~= "mainBCell" then
				--cell.Orientation = cell.Orientation * Vector3.new(1,1,0) + Vector3.new(0,0,-180)
				cell.Position = cell.Position * Vector3.new(1,0,1) + (mainBCell.Position * Vector3.new(0,1,0))
				cell:SetNetworkOwner(player)
				mainBCell.Orientation = Vector3.new(0,0,-90)
				local weld = Instance.new("WeldConstraint", cell)
				weld.Part1 = mainBCell
				weld.Part0 = cell
				cell.Parent = playerCells
				mainBCell.Orientation = Vector3.new(0,0,-90)
			end
		end
		

As you can see, I’m using a modified furniture placement system.
All imports are working fine, no errors. It simply ends up like this:
2. What is the issue?
This:


Turns into this:

3. What solutions have you tried so far?
I’ve attempted to keep reseting the orientation of the cells, but to no avail. This is highly confusing, and sometimes it even moves the other cells through the map.

Please Note: I am constantly changing the orientation of the mainBCell to 0,0,-90.

I do not understand why this is happening, and any help is much appreciated!

Thank you very much!
Someperson576

1 Like