Are the functions supplied by the user, or did you define them? If they are defined by you, simply keep a dictionary of the functions, and save the key which contains the function you want to save. Upon loading index the dictionary with the key.
local functions = {
func1 = function()
--
end,
func2 = function()
--
end
}
local savedFunctions = {"func1", "func2"}
Where are the functions defined, did you write them yourself as part of your plugin code, or are they coming from somewhere else? Show me a sample function and how the plugin receives it basically.
local function load(x)
return plugin:GetSetting(x)
end
local function decode(x)
return HttpService:JSONDecode(x)
end
local CommandData = decode(load('CommandData')) or {}
This probably isn’t possible because Luau doesn’t support dumping or loading of arbitrary bytecode, as thats how I would’ve done this if it was possible