Hello, the issue is on line 27 and despite it being a part it keeps returning the error "Position is not a valid member of Model".
I'm trying to make a auto-generating track.
Problem Code:
newMiddle.Position = Vector3.new(mainMiddle.Middle.Size.X/2,0,0)
+ middle.Finish.Position
-- And its the " Vector3.new(mainMiddle.Middle.Size.X/2,0,0) " part
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local mapsFolder = ReplicatedStorage:WaitForChild("Maps")
local maps = mapsFolder:GetChildren()
local lobby = game.Workspace:WaitForChild("Lobby").Lobby
maxLength = 10
local mainMiddle = mapsFolder.Middle
for i = 1, maxLength do
local middle = mapsFolder.Middle:Clone()
middle.PrimaryPart = middle.Start
middle.Parent = game.Workspace.Track
middle.Finish.Transparency = 1
local nextMiddle = game.Workspace.Track:FindFirstChild("Middle2")
if nextMiddle == nil then
local newPosition = Vector3.new(lobby.Size.X/2,0,0) + lobby.Position
middle:MoveTo(newPosition)
else
local theMiddle = game.Workspace:FindFirstChild("Middle"..i-1)
local newPosition = Vector3.new(theMiddle.Size.X/2,0,0) + theMiddle.Position
middle:MoveTo(newPosition)
end
local newMiddle = mainMiddle:Clone()
wait(1)
newMiddle.Position = Vector3.new(mainMiddle.Middle.Size.X/2,0,0) + middle.Finish.Position
newMiddle.Parent = game.Workspace.Track
newMiddle.Name = "Middle"..i
end

3 comments
The reason is because Models don't have the position property
You can't set the position of a model.
You can however use :SetPrimaryPartPosition with the model's priary part to make it move