generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Editing scripts code

Previous Thread :: Next Thread 
LuigiNub is not online. 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 is not online. 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 is not online. 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 is not online. LuigiNub
Joined: 26 May 2013
Total Posts: 1794
16 Dec 2013 09:03 PM
Bump

~Squidzy Jr~
Report Abuse
LuigiNub is not online. LuigiNub
Joined: 26 May 2013
Total Posts: 1794
16 Dec 2013 09:04 PM
Bump...

~Squidzy Jr~
Report Abuse
HAXO is not online. 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 is not online. LuigiNub
Joined: 26 May 2013
Total Posts: 1794
16 Dec 2013 09:06 PM
How would I do that?

~Squidzy Jr~
Report Abuse
LuigiNub is not online. LuigiNub
Joined: 26 May 2013
Total Posts: 1794
16 Dec 2013 09:08 PM
Ugh

~Squidzy Jr~
Report Abuse
HAXO is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image