Hello guys, just today have started learning how to develop plugins and have already made some great progress. However, I have run into an issue that I am having trouble with solving.
My plugin manages scripts in many different locations and quickly allows you to open and delete them, as well as providing other data.
The error in the output
The script
local update_service = game:GetService("ChangeHistoryService");
update_service:SetWaypoint("Before");
v:Destroy();
update_service:SetWaypoint("After");
v
is the script I am looking to delete. I looked at some info on the API reference manual on how to set up the plugin so I can undo things. I am looking to see how I can still delete the script and press ctrl + X/undo to get the script back. Bumping this up, and adding another issue…
When the GUI is created and I undo it, it causes the GUI in the widget to disappear and a bunch of scripts and models in the workspace to appear.
This is the script I am using to insert the UI
widget = plugin:CreateDockWidgetPluginGui("Script Orginizer", widgetInfo);
widget.Title = "Script Orginizer"; -- Optional widget title;
local asset = asset_service:LoadAsset(6748066734);
asset.Parent = workspace;
local fold = asset:FindFirstChildWhichIsA("Model")
for i,v in pairs(fold:GetChildren()) do
if v.Name == "FrameEnlister" then
frame_info_model = v
v.Parent = nil
break
end
end
for i,v in pairs(fold:GetChildren()) do
v.Parent = widget
end
asset:Destroy()
widget.Enabled = true;
UpdateScreen()