Why it changes the position

So I just want a code to join two parts like this:

But the code its always changing its position and rotation, making it to look like this:

Heres the code:

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local modelsStage1 = ReplicatedStorage:WaitForChild("Stage1")

--First Stage

task.wait(2)

local function chooseModelStage1()
	local models = modelsStage1:GetChildren()
	if #models == 0 then
		warn("Error1")
		return nil
	end
	
	local randomIndex = math.random(1, #models)
	return models[randomIndex]
end

local stage1 = chooseModelStage1()
if stage1 then
	local clone = stage1:Clone()
	local startPos = game.Workspace.StartingSpot.EndHelper:GetPivot()
	clone.Parent = game.Workspace
	clone:SetPrimaryPartCFrame(startPos)
end
1 Like

I cant see the second image, but from what I can assume, what you want to do is to weld the 2 parts together.

I just want the second part to be after the 1st one, is a stage.is for a random stage system. U can open the second image by opening on a new tab

I think the orientation of the Primary part of the model is not the same as the other Primary part.

It would look like this (The gray part with the Front text is the Primary Part)
image

To this:
image

Other Variation:


image

Oh ok! so theres a way to change the orientation of the primary part?

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.