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

How do I make a gui for a plugin work?

I'm trying to make a plugin. However, the wiki tutorial for plugins aren't providing information on how I can manipulate guis for plugin purposes.

I would like an example, a very simple one, say, if I click a textbutton, the plugin script prints out 2. Thank you.

1 comment

0

I'd imagine you'd put the GUIs in the 'CoreGui' service, but that's just my guess.

1 answer

Heres an example :) Just put the gui stuff in CoreGui

local Plugin = PluginManager():CreatePlugin()
local Toolbar = Plugin:CreateToolbar("MyToolbar")
local Button = Toolbar:CreateButton("MyButton","This is my button","")


function Activate()
	Button:SetActive(true)
	local gui = Instance.new("ScreenGui", game:GetService("CoreGui"))
	local frame = Instance.new("Frame")
	frame.Size = UDim2.new(0.1, 0, 0.1, 0)
	frame.Position = UDim2.new(0.3, 0, 0.3, 0)
end


local active = false
Button.Click:connect(function()
	active = not active
	if active then
		Plugin:Activate(true)
		Activate()
	else
		Button:SetActive(false)
	end
end)

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