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

Is it possible to edit a script from a script?

For example lets say

script = game.Workspace.Script
--Just a example of what I want 
script.Code = Code.new(game.workspace,11)--Line number

and we wanted to edit it is there any variable for this?

2 comments

0

No, you can't

0

I you can't do this. Quick answer.

1 answer

✓ Accepted answer

No, you cannot edit a Script's inner code directly with another Script.

However, you can alter the "Disabled" property of another Script in order to turn them on or off, (which could effectively break a loop or prevent another script's function from being activated), as well as use Module Scripts to return called values to carry out functions within a different Local or Server Script.

This discussion is preserved as it was. New answers, comments, and votes are closed.