So Im making a plugin. I have the ScreenGUI in CoreGUI and it enables if someone presses the button on the toolbar.
In the GUI, do I use a Local Script or a regular Script? Its not for the actual game, so I don’t know.
So Im making a plugin. I have the ScreenGUI in CoreGUI and it enables if someone presses the button on the toolbar.
In the GUI, do I use a Local Script or a regular Script? Its not for the actual game, so I don’t know.
You would need to use a local script. local scripts allow you to do game.Players.LocalPlayer which you can’t to in a server script
Its for a plugin. Why would I do game.Players.LocalPlayer?
How would a server script be able to detect a button press coming from a client?
Good point. Should my plugin GUI be in CoreGUI or PluginGUI?
I haven’t dabbled with plugins in a long while, so I never really looked into the whole PluginGui service, I would take a gander at the wiki and see how they do all of that.
You would do it in CoreGui You can also detect input with a normal script, but only when its a plugin. I used a normal script for my GUI on this plugin, and I was able to detect all input. The Roblox wiki recommends using scripts and not local scripts for plugins.
But then how do I find who clicked?
Its a property of the button? I have my GUI inside a folder in which the plugin script is also inside. I have the button as a variable and when some clicks it the button triggers the MouseButton1Click event. Are you trying to figure out when someone clicks the toolbar or a button inside your UI?
Im taking about the Button inside my UI.
Okay then a normal script can access it, if its inside CoreGui.
But only when doing it in a plugin, plugins have exceptions to things. A script inside a plugin can access CoreGui but it cannot access PlayerGui, because PlayerGui doesnt exist until the game is started and when a game starts the plugin gets closed.
A normal script should work fine
can I have a link to that plugin?
Its not finished yet haha. Ive got lots to add and such.