Basically I want to make an infinite road by adding the roads repeatedly as a straight line, but I don’t know how to move the roads by CFrame.
Script:
local folder = game.ServerStorage.Folder
local pathIn = 0
for i = 1,10 do
local part = folder.Path:Clone()
if pathIn > 1 then
local zOfLastPath = workspace["Path".. pathIn].Road.Position.Z
pathIn += 1
part.Name = "Path"..pathIn
part.Parent = workspace
part:SetPrimaryPartCFrame(CFrame.new(Vector3.new(0,0,zOfLastPath))) -- problem is right here
else
pathIn += 1
part.Parent = workspace
part.Name = "Path"..pathIn
end
end