I'm working on a script that moves a part a certain distance more than the last part, but it keeps giving me the error code "Workspace.tileinfo:40: bad argument #2 to '?' (Vector3 expected, got number)"
function mapgen()
local vector = 0, 0, 0
for i = 1, mapsize do
makenewtile()
local lsample = sample
local vector = lsample + 2, 0, 0 -- this is line 40
game.Workspace.Model:MoveTo(Vector3.new(vector))
sample = game.Workspace.Model.PrimaryPart.Position
lsample = vector -- don't worry about this please i know how to fix it
print(i)
i = i + 1
end
end
