I'm currently trying to make a plugin but of course I ran into a problem with scaling the GUI to the window, does anyone know a built in function to force the size of a dockwidgetgui to the gui that the widget contains? Here's the code I've got now


local Toolbar = plugin:CreateToolbar("GuiTest")
local openwidgetButton = Toolbar:CreateButton("NameOrganizer", "Open gui", "rbxassetid://73737627")
local open = false
local nameSetterGui = script.Parent.organizePartsGui
local organizerWidgetInfo = DockWidgetPluginGuiInfo.new(
    Enum.InitialDockState.Float,
    false,
    true,
    278,
    142,
    278,
    142
)

local widgetGui = plugin:CreateDockWidgetPluginGui("NameOrganizer", organizerWidgetInfo)
widgetGui.Title = "setParameters"
widgetGui.AutoLocalize = true

script.Parent.organizePartsGui.Parent = widgetGui
openwidgetButton.Click:Connect(function()
    if open then
        widgetGui.Enabled = false
        open = false
    else
        widgetGui.Enabled = true
        open = true
    end
end)

Here's the result; https://gyazo.com/6bbff89287e745aeba3c9a3f3ae3d83d

1 comment

0

Bump