GUI Buttons on plugin don't work

  1. What do you want to achieve?
    A working plugin with GUI buttons

  2. What is the issue?
    Buttons don’t work

  3. What solutions have you tried so far?
    Look online for solutions but none have worked

Code:

local toolbar = plugin:CreateToolbar("Alwaysless Engine")
local button = toolbar:CreateButton("Get Started","Begin the proccess of installing","")
local gui = script:WaitForChild("PluginGui", 10)

button.Click:Connect(function()
	if gui.Parent == script then
		gui.Parent = game:WaitForChild("CoreGui")
	elseif gui.Parent == game:WaitForChild("CoreGui") then
		gui.Parent = script
	end
end)

gui.Scripts.MouseButton1Click:Connect(function()
	gui.Scripts.Text = "Success"
end)

gui.Weapons.MouseButton1Click:Connect(function()
	gui.Weapons.Text = "Success"
end)

gui.Panel.MouseButton1Click:Connect(function()
	gui.Panel.Text = "Success"
end)

Thank you for reading.

I forgot to put a .Frame after gui