Is it possible to delete lines in a script via code. For example like this:
local aScript = ServerStorage:WaitForChild("aScript") aScript.Line3:Destroy()
Is this somehow possible?. It would be really helpfull.
Never even heard of use cases of this, what would this achieve?
If u require a Module which is requiring it self then it would be helpfull to delete the line where it require itself to stop a infinite loop of requiring.
Scripts have a Source property which is a string representation of the script’s content but developer code does not have a high enough context level to access it. Even then it’s not like being able to modify it would do anything since scripts are all compiled and executed at run time.
What’s the real problem you’re trying to resolve? You should never have a use case where you need to “delete” a line mid-program. There’s a use case for monkey patching but you’re not trying to do that so I think it’s more important to look at your actual use case here.
Why would a module need to require itself?