part = Instance.new("Part", workspace) part_script = Instance.new("Script", part) part_script = "my script"
how can I edit the script that will get inserted in the part?
Using Script.Source
edits the script, but it is only used in the command bar or plugins.
Here is a link:
https://developer.roblox.com/en-us/api-reference/property/Script/Source