Unable to cast Coordinate Frame to Vector3
The error is on line 22, what is the problem?
local FPD = false -- First Part Down, tells the script when the first section has been placed.
local parentHere = workspace.RoomFolder
local cells = game.ReplicatedStorage:GetChildren()
for i, v in pairs(cells) do
v.PrimaryPart = v.Start
end
for y = 1, 4, 1 do
local cell = cells[math.random(#cells)]:clone()
cell.Parent = parentHere
if FPD == true then
local pos = script.NextPosition.Value
cell:MoveTo(pos)
script.NextPosition.Value = cell.Finish.CFrame
end
if FPD == false then
local pos = workspace.RoomFolder.Begin.Finish.CFrame
cell:MoveTo(pos)
FPD = true
script.NextPosition.Value = cell.Finish.CFrame
end
wait(1)
end

2 comments
thank you, just so you know the next position line is a CFrameValue i added inside the script and named NextPosition, didnt even know it was a part of lua code. Will your answer still work under the surcumstances?
it works now. thanks