Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Gui will not appear upon activation of my plugin?

I am making an advanced antivirus plugin. Everything is working so far and the GUI is ready to be used. However, I am new to plugins. I've made the toolbar and added the icon to it. However, I don't see the GUI when I click it, I know the script is running because of the prints in the output. The issue is that I cannot see the GUI. I have no idea what I am doing wrong and I feel like this script is an absolute mess of stuff I do not understand.

--MalTrax // Property of iiPizzaCraver
--This script creates the icon in the toolbar and sets everything up for you with just one click!
--Designed to be as effective and as easy as possible for our fellow developers!

local changehistoryservice = game:GetService("ChangeHistoryService")
local coregui = game:GetService("CoreGui")
local toolbar = plugin:CreateToolbar("MalTrax Free AntiVirus")

local newscriptbutton = toolbar:CreateButton("Insert MalTrax", "Add MalTrax To Begin Protecting Your Game!", "rbxassetid://5061074282")

local newgui = script.Parent.Gui:Clone()


local info = DockWidgetPluginGuiInfo.new{
	Enum.InitialDockState.Float,
	false,
	false,
	200,
	300,
	150,
	150
}

local pluginGui = plugin:CreateDockWidgetPluginGui(newgui, info)

newscriptbutton.Click:Connect(function()
if game.PluginGuiService.PluginGui.Enabled == true then
	game.PluginGuiService.PluginGui.Enabled = false
	else
	game.PluginGuiService.PluginGui.Enabled = true
	newgui.MenuMaster.Disabled = false
	print("MalTrax Menu has been set up! Now loading")
	end
end)


Literally, the only error I get in the output is that the icon for the plugin won't load but that's only because the icon has only been very recently uploaded and is still being reviewed.

Any help is much appreciated! I'm whitelisting anyone who helps me enough to completely fix this issue so you can use MalTrax before others. Thanks :)

2 comments

0

i think your problem is somewhere in 26 to 34, im still triangulating it though

0

nevermind

1 answer

Your problem is that you used a table to hold your plugin info, you used { } instead of ( ). As seen in the code sample here, the sample code uses ( ) for creating their info. That's the only problem I see for now, I'll edit my answer if I see anymore.

--MalTrax // Property of iiPizzaCraver
--This script creates the icon in the toolbar and sets everything up for you with just one click!
--Designed to be as effective and as easy as possible for our fellow developers!

local changehistoryservice = game:GetService("ChangeHistoryService")
local coregui = game:GetService("CoreGui")
local toolbar = plugin:CreateToolbar("MalTrax Free AntiVirus")

local newscriptbutton = toolbar:CreateButton("Insert MalTrax", "Add MalTrax To Begin Protecting Your Game!", "rbxassetid://5061074282")

local newgui = script.Parent.Gui:Clone()


local info = DockWidgetPluginGuiInfo.new(
    Enum.InitialDockState.Float,
    false,
    false,
    200,
    300,
    150,
    150
)

local pluginGui = plugin:CreateDockWidgetPluginGui(newgui, info)

newscriptbutton.Click:Connect(function()
if game.PluginGuiService.PluginGui.Enabled == true then
    game.PluginGuiService.PluginGui.Enabled = false
    else
    game.PluginGuiService.PluginGui.Enabled = true
    newgui.MenuMaster.Disabled = false
    print("MalTrax Menu has been set up! Now loading")
    end
end)


1 comment

0

Same problem as before, although it brings up the gui of another plugin i own that i didnt make.

This discussion is preserved as it was. New answers, comments, and votes are closed.