i currently have this script here:
local Name = "Terrain Generator"
local toolBar = plugin:CreateToolbar("Dollor's Plugins")
local Text = "Generate Terrain"
local ToolTip = "Click this button, set the prefrences to what you like, then click generate."
local Button = toolBar:CreateButton(Name, ToolTip, "rbxassetid://413372167", Text)
local widgetInfo = DockWidgetPluginGuiInfo.new(Enum.InitialDockState.Float,true,false,200,300,150,150)
local testWidget = plugin:CreateDockWidgetPluginGui("TerrainGenerator", widgetInfo)
testWidget.Title = "Terrain Generator"
testWidget.Enabled = false
local function syncGuiColors(objects)
local function setColors()
for _, guiObject in pairs(objects) do
guiObject.BackgroundColor3 = settings().Studio.Theme:GetColor(Enum.StudioStyleGuideColor.MainBackground)
guiObject.TextColor3 = settings().Studio.Theme:GetColor(Enum.StudioStyleGuideColor.MainText)
end
end
setColors()
settings().Studio.ThemeChanged:Connect(setColors)
end
Button.Click:Connect(function()
if testWidget.Enabled == false then
testWidget.Enabled = true
else
testWidget.Enabled = false
end
end)
but whenever i click the UI Button it doesn't open the DockWidget, is there any better way of enabling the DockWidget?
