Plugin Help [URGENT]

Hey there my name is Viridian, I’m currently working on a plugin and I need help with turning the UI into a plugin. I’ve programmed the base UI and buttons in the UI. I even made the plugin toolbar button open the UI and close it. However none of the buttons seem to work in the UI after turning it into a plugin. It seems like the scripts wont work (I’m using LocalScripts). Let me know if you can help. Thanks for your time.

Could you show me your script?

The search script seems to work however the script for the buttons wont. `script.Parent.MouseButton1Click:Connect(function()
local Main = script.Parent.Parent.Parent.Parent.Parent.Parent.Parent.EasyTextures
local TexturesFolder = Main.TexturePack
local MaterialData = script.Parent.Parent.Texture
local Viewer = Main[“3DViewer”]
Viewer.Visible = true
Main[“SearchNav-All”].Visible = false

	local NewTexture = TexturesFolder:FindFirstChild(MaterialData.Value)
for _, Textures in pairs(NewTexture:GetChildren()) do
		wait()
		Viewer.Refrence.BrickColor = NewTexture:WaitForChild("ColorData").Value
		Textures:Clone().Parent = Viewer.Refrence
			Viewer.ObjectTitleData.Text = MaterialData.Value
		end
end)`

Could it be because I automatically clone buttons from templates on the client side however the server side does not notice it?

Hi!

So, first of all you need to use a normal Script, not LocalScripts.

Every plugin can have only one script that runs when the plugin starts. You can use ModuleScripts if you want to break the code down to separate scripts and run them from the main Script.

Could you help me fix the plugin up if I gave you the place file?

What plugin is it just curious

and im pretty sure you can use gui to lua

Sorry I don’t really have time to do that stuff.
Just try combining the scripts into one script first. If it becomes too long, use modulescripts.