I want to get arguments from using string.split on a table.
I got the string.split working but i don’t know how to format it into the arguments
The arguments I want are blockName and blockCframe.
local tabel = {
[1] = '"totemIron"|||"-3503, 48, -3683, 1, 0, 0, 0, 1, 0, 0, 0, 1"',
[2] = '"totemIron"|||"-3503, 48, -3692, 1, 0, 0, 0, 1, 0, 0, 0, 1"',
[3] = '"totemIron"|||"-3500, 48, -3698, 0, 0, 1, 0, 1, -0, -1, 0, 0"',
[4] = '"totemIron"|||"-3503, 48, -3671, 1, 0, 0, 0, 1, 0, 0, 0, 1"',
[5] = '"totemIron"|||"-3503, 48, -3686, 1, 0, 0, 0, 1, 0, 0, 0, 1"',
[6] = '"totemIron"|||"-3485, 48, -3692, 1, 0, 0, 0, 1, 0, 0, 0, 1"',
[8] = '"pinePlank"|||"-3494, 54, -3659, 1, 0, 0, 0, 1, 0, 0, 0, 1"'
}
for index = 1, #tabel do
local split = string.split(tabel[index], "|||")
for index, value in pairs(split) do
local args = {
[1] = {
["cframe"] = blockCframe, -- I need help getting this
["blockType"] = blockName -- I need help getting this
}
}
game:GetService("ReplicatedStorage").PlaceBlock:InvokeServer(unpack(args))
end
end