Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to add a GUI to a plugin?

Asked by
funzrey 58
8 years ago

Before you suggest the wiki, I already scanned the wiki, I couldn't find any sources. OK, so I am working on a plugin port of my Paint Bucket which BlueTaslem helped me with a while back, I am trying to add a GUI, I don't want to script it, so I added a ScreenGui with the stuff I want (it still uses a script to compile the colors and stuff), I will give you a snippet of my GUI code where it should show:

--set up the GUI
gui = Interface:Clone()
--(BREAKPOINT) gui.Parent = 
paintBtn.Click:connect(function()
    print("Plugin is now active")
    plugin:Activate(true) -- Neccessary to listen to mouse input
    gui.BTPaintToolGUI.Visible = true
end)

All of the variables are defined, so yeah. What do I set the parent of the variable gui to? Where I put (BREAKPOINT) is where I am having issues, is setting the gui.Parent. If I need improvements or more details, add a comment and I will try my best. Thank you guys for helping me in advance -funzrey

1
Put it into game.CoreGui LetThereBeCode 360 — 8y

1 answer

Log in to vote
1
Answered by
1waffle1 2908 Trusted Badge of Merit Moderation Voter Community Moderator
8 years ago

Instance.new("ScreenGui",game.CoreGui)

Plugins use CoreGui.

Ad

Answer this question