plugin:OpenScript() Deprecated

As of 2025-09-17T05:00:00Z :OpenScript() has been deprecated (For me at least). I work a lot with custom plugins for myself, so they’re always on my computer. However, when reloading plugins with the shortcut they don’t open back up to the scripts I was working on. Before it would open all the scripts I was working on for the plugin, but not anymore. Therefore, I switched to using :OpenScript() instead to continue coding after reloading so many times.

Would there be an alternative to using :OpenScript()? Or somehow have the plugin re-open scripts itself after reloading like it used to? Seems like I’m stuck with orange lines at the top of my code :sweat_smile:.

Pretty sure you can use ScriptEditorService:OpenScriptDocumentAsync(...) to open scripts now.

local ScriptEditorService = game:GetService("ScriptEditorService")
ScriptEditorService:OpenScriptDocumentAsync(path to script)

Yep that solved the issue. Unfortunately you cannot select what line you wanted, but I figured it out with:
game:GetService("ScriptEditorService"):FindScriptDocument(script):ForceSetSelectionAsync(1, 1) Thanks again!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.