How would you detect if a plugin is open already, and when the game is ran, it stays open?
Lets say i have a plugin, and i turn it on. I press the run button, but the plugin disappears. I basically don’t want it to disappear. How would i do this?
How would you detect if a plugin is open already, and when the game is ran, it stays open?
Lets say i have a plugin, and i turn it on. I press the run button, but the plugin disappears. I basically don’t want it to disappear. How would i do this?
Could you show the code to your plugin? It shouldn’t be disappearing from the ribbon.
Oh no not the ribbon. When the plugin is actually open, ( it uses DockWidgetPluginGuiInfo
) it removes that window
Have you tried opening it after the game runs? It should hopefully remember to keep it open after you do that.
If that doesn’t work, then I guess you can use plugin datastores with plugin:GetSetting(name)
, plugin:SetSetting(name, jsonvalidvariant)
.
yea but the thing is some stuff might happen immediately when the game starts.
also can you explain the plugin datastores?
local toolbar = plugin:CreateToolbar("Studio: Create Suite")
local Storage = Instance.new("Folder", game.ReplicatedStorage)
Storage.Name = "Production_Storage"
local button0 = toolbar:CreateButton(
"Unique_ID_0",
"Button_Tooltip",
"rbxassetid://5806779841",
"Button_Name"
)
local widgetInfo = DockWidgetPluginGuiInfo.new(
Enum.InitialDockState.Bottom, --: This is the initial dockstate of the widget
false, --: Initial state, enabled or not
true, --: Can override previous state?
500, --: Default width
200, --: Default height
100, --: Minimum width
200 --: Minimum height
)
--: This will be the info of the widget we're going to create
local widget0 = plugin:CreateDockWidgetPluginGui("widget0", widgetInfo)
widget0.Title = "Production | Output"
script.Parent.MainFrame.Toolbar.Settings.MouseButton1Click:Connect(function()
widget0.Title = "Production | Settings"
end)
script.Parent.MainFrame.Settings.Close.MouseButton1Click:Connect(function()
widget0.Title = "Production | Output"
end)
script.Parent.MainFrame.Parent = widget0
local function onButton0Click()
if widget0.Enabled == true then
widget0.Enabled = false
elseif widget0.Enabled == false then
widget0.Enabled = true
end
end
button0.ClickableWhenViewportHidden = true
button0.Click:Connect(onButton0Click)
thats the main script if you want it. (Its not done)
all u need to do is set this to false, this should work.
is there anyway this can run any quicker?
Hmm, what do you exactly mean?
let me explain. I have a plugin that is basically an output 2.0, with loads of new features. i have a script in workspace that prints “hi”. When i run the game, it doesn’t show hi in my output (yes the output does work it handles errors warnings all that)
Well, let’s discus this in PMs.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.