this is my first project so sorry if it seems i’m being dumb
-
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. -
What is the issue? Include screenshots / videos if possible!
My script isn’t creating copys and moving the models -
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