LuigiNub
|
  |
| Joined: 26 May 2013 |
| Total Posts: 1794 |
|
|
| 16 Dec 2013 09:00 PM |
Instance.new("Script", game.Workspace) local Script = Instance.new("Script", gane.Workspace) Script.name = "Imported"
Is a snippet from a thing im working on, after its inserted into the workspace how would I edit the code via this method.
~Squidzy Jr~ |
|
|
| Report Abuse |
|
|
Absurdism
|
  |
| Joined: 18 Jul 2013 |
| Total Posts: 2568 |
|
|
| 16 Dec 2013 09:01 PM |
| The Source property is locked; you, thereby, cannot. |
|
|
| Report Abuse |
|
|
LuigiNub
|
  |
| Joined: 26 May 2013 |
| Total Posts: 1794 |
|
|
| 16 Dec 2013 09:02 PM |
Is it possible to make it so I can because for the plugin im making it needs to insert the script
~Squidzy Jr~ |
|
|
| Report Abuse |
|
|
LuigiNub
|
  |
| Joined: 26 May 2013 |
| Total Posts: 1794 |
|
| |
|
LuigiNub
|
  |
| Joined: 26 May 2013 |
| Total Posts: 1794 |
|
| |
|
HAXO
|
  |
| Joined: 19 Mar 2010 |
| Total Posts: 690 |
|
|
| 16 Dec 2013 09:04 PM |
Use loadstring()() instead. Then put the Imported script into a StringValue instead of a Script object. |
|
|
| Report Abuse |
|
|
LuigiNub
|
  |
| Joined: 26 May 2013 |
| Total Posts: 1794 |
|
|
| 16 Dec 2013 09:06 PM |
How would I do that?
~Squidzy Jr~ |
|
|
| Report Abuse |
|
|
LuigiNub
|
  |
| Joined: 26 May 2013 |
| Total Posts: 1794 |
|
| |
|
HAXO
|
  |
| Joined: 19 Mar 2010 |
| Total Posts: 690 |
|
|
| 16 Dec 2013 09:08 PM |
Which part?
local code = 'print\'Hello World\'' loadstring(code)()
The output should be:
Hello World |
|
|
| Report Abuse |
|
|
LuigiNub
|
  |
| Joined: 26 May 2013 |
| Total Posts: 1794 |
|
|
| 16 Dec 2013 09:09 PM |
All I need to do is make a freaking script get inserted INTO workspace WITH the code I want in it
~Squidzy Jr~ |
|
|
| Report Abuse |
|
|
LuigiNub
|
  |
| Joined: 26 May 2013 |
| Total Posts: 1794 |
|
|
| 16 Dec 2013 09:10 PM |
But of course its being stupid right now and nothing I try is freaking working its annoying I should be able to change a scripts code via property box
~Squidzy Jr~ |
|
|
| Report Abuse |
|
|
HAXO
|
  |
| Joined: 19 Mar 2010 |
| Total Posts: 690 |
|
|
| 16 Dec 2013 09:12 PM |
Instead, put a StringValue in the script(let's call it "Jake").
Then In the script put this line: loadstring(script.Jake)()
Now that script(when it is run) will just run the code you put in the Jake value (That means set the Jake.Value as you code you want to put in the script) |
|
|
| Report Abuse |
|
|
Quorum
|
  |
| Joined: 25 Oct 2013 |
| Total Posts: 4680 |
|
|
| 16 Dec 2013 09:23 PM |
@Others, There's no need for a "long workaround". In his second response he stated it was for a plugin, which can still utilise the '.Source' property of scripts.
Instance.new("Script", game.Workspace) local Script = Instance.new("Script", game.Workspace) Script.Name = "Imported" Script.Source = [[ print("Nope") ]] |
|
|
| Report Abuse |
|
|
Absurdism
|
  |
| Joined: 18 Jul 2013 |
| Total Posts: 2568 |
|
|
| 16 Dec 2013 09:32 PM |
| Yes, if it is in a plugin 'Source' is still there. |
|
|
| Report Abuse |
|
|