It works, but the problem is that, you made SUCH a big plugin with so many modules when you literally have InsertService:LoadAsset(assetId: number). Your code could be something like this
local InsertService = game:GetService("InsertService");
InsertButton.MouseButton1Cilck:Connect(function()
local suc, result = pcall(function()
return string.split(InsertBox.Text, ("," or ";")); -- Seperates it by a comma or a semi-colon.
end);
if suc then
for _, v in pairs(result) do -- Result is a table of all the values.
local suc2, res = pcall(function()
v = tonumber(v);
end); -- Kind of necessary so that we can convert it to a number without errors.
if suc2 then
InsertService:LoadAsset(v);
else
warn(res);
end;
end;
else
warn(result);
end;
end);
There could be errors in this script, but it’s just a test code to show you what I meant.
Also the way the plugin is structured is totally irrelevant and completely fine, so I don’t see the value in commenting on it at all. I’m not interested in unsolicited code review! It’s not very helpful.