so i want when the plugin:OpenScript
script editor closes, fire a function; but there’s one issue, :GetScript()
returns nil
local target
plugin:OpenScript(target)
ScriptEditorService.TextDocumentDidClose:Connect(function(document: ScriptDocument)
print(document:GetScript()) -- nil
if document:GetScript() == target then f() end
end
are there any alternatives I could take?