I know how to create a script from a script [Instance.new('Script')] but how would I have it created with some codes onto already? What do I add in the existing script to make the newly generated script to have code?
COMMUNITY QUESTION
How to created a script via existing script that already has coding written on it?
2 answers
you can you the clone() function to duplicate an already-made script. Simply do something like this:
Script = (put the location of the script you want to clone/duplicate here!)
NewScript = Script:Clone()
NewScript.Parent = (wherever you want to parent it.)
local newScript = Instance.new("Script")
local localScript = Instance.new("LocalScript")
local moduleScript = Instance.new("ModuleScript")
2 comments
0
Yeah, like I just can't go into Advance Objects and insert them.
0
You misunderstood the question.
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Nah, I might as well just Ctrl+D that.