Modifying a module in studio with plugin

I’m working on a plugin that allows my builder to add items to the game without having to manually go in and edit the config file

The issue is any changes to the module by the plugin don’t actually change the module, but rather it just changes plugin version of it

setButton:GetButton().Activated:Connect(function() -- adds a config to list of WeaponConfigs
	local config = {}
	for i = 2, #textboxes do
		local textbox = textboxes[i]
		config[textbox:GetLabel().Text] = textbox:GetValue()
	end
	WeaponConfig[textboxes[1]:GetValue()] = config
	update()
end)

Is there a way to directly modify the module with a plugin, or some other way of doing this?

my only other idea as of now is maybe using datastores for it, but if there is a easier way I’d like to know

1 Like

You can have your plugin edit the module’s source as long as you write a string pattern to ensure that you are changing exactly what you want.

1 Like