this is my plugin’s script, when i open the plugin the gui pops up with tween but when i close plugin the closing tween doesn’t work and when i open it after the tween doesn’t work here is the script:
1. local toolbar = plugin:CreateToolbar("Player Character Loader v1")
2. local btn = toolbar:CreateButton("Load Character", "Load Character", "rbxassetid://8434139067")
3. local gui = script:WaitForChild("Gui")
4. btn.Click:Connect(function()
5. if gui.Parent == script then
6. gui.Parent = game:WaitForChild("CoreGui")
7. local frame = gui:WaitForChild("Background")
8. frame:TweenPosition(UDim2.new(0.339, 0,0.232, 0), "Out", "Back")
9. else
10. gui.Parent = script
11. frame:TweenPosition(UDim2.new(1,1,1,1), "Out", "Back")
12. end
13. end)