I’m trying to insert table into new script properly, so it looks exactly like in script.
ex:
local tab = {
["a"] = "1";
["b"] = "2";
}
and I want it to look like that in a new script I’m creating (it’s a plugin, .Source works.)
local Script = Instance.new("Script", workspace)
Script.Name = "w"
Script.Source = ""
--[[
and so script's source will be
local tab = {
["a"] = "1";
["b"] = "2";
}
--]]
Is there a way to do that?
I mean I tried things like JSON and TableToString
They don’t work as I want though (table to string is close)
local t = {}
addPartsToTable(t)
createNewScriptWithSource(t)
--something like that
--[[
I don't know what parts model has and what it inserts to table,
so I want it to do it automatically, not manually
--]]