Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How to created a script via existing script that already has coding written on it?

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?

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.)

1 comment

0

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

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.