How to create a Instance.new("Script") then inside of that script accessing its source code to put in code

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    I want access a scripts source code while in a script; looked at a bunch of forums and they all say its impossible without a PLUGIN or the COMMAND BAR. I tried to look for a plugin to download, found nothing; what do they mean use the command bar? Like do you access the command bar while in the script and write something in it.

         I want access a scripts source code while in a script; looked at a bunch of forums and they all say its impossible without a PLUGIN or the COMMAND BAR. I tried to look for a plugin to download, found nothing; what do they mean use the command bar? Like do you access the command bar while in the script and write something in it.
    

print(0)

local Script = Instance.new("Script")
Script.Source = "print(\"hello world\")"

If I’m correct you can only do this on the command bar.

The feature was possibly deprecated a bit ago due to exploits

The current thread cannot write ‘Source’ (lacking capability Plugin)

Yeah the only possible way to do something remotely similar is using loadstring(). I’m not sure why you feel that its necessary to create a script and then modify it’s code from a secondary script, when you could just create the script once and :Clone() and .Parent it to where it needs to go at runtime/whenever its needed. If that doesn’t work, you could create a ModuleScript for whatever it is and a ServerScript which will handle the creation of the thing you are trying to make.

3 Likes

you fgin genius I think that should work let me try it tysm.