How to Insert a Value into a Script's Table with the Command Bar

Hi!

I have got a configuration script with a table inside of it containing items from my game. This is what one item looks like:
image

I want to be able to easily add new items and replace values in those items from Studio with a script in the command bar.

I already figured out it’s possible to get the source container from the script but that only returns a string, so it seems complicated to me to manipulate that string to accomplish the changes. I also tried requiring the script, but when I make changes to it they don’t actually get changed in the script itself.

Use a modulescript for this if you want to configure the table using other scripts.

The table is already in a module script. What I want to do is change the table in Studio (as opposed to in-game how it is done normally).

I assume that the table is being returned at the bottom of the module?

For anybody who wants to do the same. I managed to fix it by: requiring the configuration script > making the adjustments I wanted, > converting the table to one big string > set the big string to the actual script (not required) with .source.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.