If you don’t need the indexes, you could just tostring()
the Vector3s and then utilize table.concat()
to combine it into 1 long string of numbers.
local myTable = {}
for i=21, 0, -1 do
table.insert(myTable, tostring(Vector3.new(math.floor(0), math.floor(math.random(0, 21)), math.floor(0))))
end
local myNumbers = table.concat(myTable, ", ", 1, #myTable)
print(myNumbers)
This prints: 0, 18, 0, 0, 20, 0, 0, 9, 0, 0, 20, 0, 0, 8, 0, 0, 11, 0, 0, 16, 0, 0, 20, 0, 0, 16, 0, 0, 4, 0, 0, 1, 0, 0, 21, 0, 0, 6, 0, 0, 17, 0, 0, 14, 0, 0, 20, 0, 0, 7, 0, 0, 12, 0, 0, 4, 0, 0, 21, 0, 0, 11, 0, 0, 2, 0
You could then take the text provided via table.concat()
and set it to the Text property of the TextBox the player will be copying from.