Why my code for plugin no work?

Trying to make a plugin that makes vines. However the gui doesn’t show.
Here’s the important things I guess

local CoreGui = game:GetService("CoreGui")

local toolbar = plugin:CreateToolbar("BadVines")
local pluginButton = toolbar:CreateButton("Create Vines", "Creates blocky vines", "rbxassetid://6897949471", "Create Vinees")

local PluginGui = script.Parent:FindFirstChild("PluginGui")
local CreateVinesFrame = PluginGui:FindFirstChild("CreateVines")

pluginButton.Click:Connect(function()
	if PluginGui.Parent == script then
		PluginGui.Parent = CoreGui
	elseif PluginGui.Parent == CoreGui then
		PluginGui.Parent = script
	end
end)

RblxCode

local toolbar = plugin:CreateToolbar("BadVines")
local pluginButton = toolbar:CreateButton("Create Vines", "Creates blocky vines", "rbxassetid://6897949471", "Create Vinees")

local PluginGui = script.Parent:FindFirstChild("PluginGui")
local CreateVinesFrame = PluginGui:FindFirstChild("CreateVines")

pluginButton.Click:Connect(function()
	if PluginGui.Parent == script then
		PluginGui.Parent = game.CoreGui or game:GetService("CoreGui")
	elseif PluginGui.Parent == CoreGui then
		PluginGui.Parent = script
	end
end)

?

It didn’t work, still doesn’t show

is the plugin gui even enabled?

yes it is, enabled
hhhhhhhhhhh

can you tell me if its printing anything? (add prints in the if statements)

After typing the print statements I just realized that the parent was the folder. Not the script. Now I feel dumb. I was following a tutorial that didn’t work so I went through forums for a tutorial and forgot to change the parent to the folder when I made a folder…

oh… haha yea that happens…