The issue is that it is supposed to insert the gui into “CoreGUI” but it is unable to find it and I am getting this error: “‘CoreGUI’ is not a valid Service name. I am a beginner on plugins but my whole process is: Inserting script into ServerScriptService > Writing the Code > Inserting GUI under the Script > Then saving as local plugin.”
I can’t find any solutions of the Developer Hub.
local openGuiButton = toolbar:CreateButton("Create Scripts", "Test", "")
local gui = script:FindFirstChildOfClass("ScreenGui")
local coreGui = game:GetService("CoreGUI")
openGuiButton.Click:Connect(function()
if gui.Parent == script then
gui.Parent = coreGui
end
end)
Actually I fixed it. It seems that when I put it into a folder instead of making the GUI the child of the script and instead putting both into a folder it works. and I edited the script to say: gui = script.Parent.PluginGUI
Dunno why this works but it does