How could I move a model by adding a number to the x Coordinate then duplicate it?

this is my first project so sorry if it seems i’m being dumb

  1. What do you want to achieve? Keep it simple and clear!
    I’m trying to achieve a system where I can duplicate a model that I made and move it +40 along the x-axis without naming variables (local clone = object:Clone()). I’m trying to achieve this by moving the object that’s being cloned to the position that I want and cloning it.
  2. What is the issue? Include screenshots / videos if possible!
    My script isn’t creating copys and moving the models
  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    I looked for solutions on YouTube and the developer form but I don’t understand them.

My code so far:

local turnLeft = game.Workspace.TurnLeft
local turnRight = game.Workspace.TurnRight
local basicPath = game.Workspace.BasicPath

local randomNumber = math.random(1,2,3)

while true do
	if randomNumber == 1 then
		newLeftPos = turnLeft.CFrame + Vector3.new(0,40,0)
		turnLeft:MoveTo(newPathPos)
		turnLeft:Clone()
	end 

	if randomNumber == 2 then
		newRightPos = turnRight.CFrame + Vector3.new(0,40,0)
		turnRight:MoveTo(newPathPos)
		turnRight:Clone() 
	end 

	if randomNumber == 3 then
		newPathPos = basicPath.CFrame + Vector3.new(0,40,0)
		basicPath:MoveTo(newPathPos)
		basicPath:Clone()
	end
end

Photo:


The shape on top is were the path will start, the three shapes on the bottom are the shapes that will connect to the shape on top

Thanks!

Edit: I’ll give the project access to someone if you want to see what is wrong with it hands on

You should clone it before you use :MoveTo.

Yes but the I’ll have to make a variable right?

newLeftClone = turnLeft:Clone

Will you be using the variable for anything? If not then you can just clone it before you move the turnLeft.

Well I’m trying to make it infinitely generating

I don’t believe you will need the variable since you are randomly creating the turns.