Do you use local scripts or server scripts for plugin Guis?

teamPluginGui.TeamFrame.ColorPicker.ColorShower.BackgroundColor3 = Color3.fromRGB()

this line seems to have no colors given, so it will always return a Color3 with R,G,B set to 0
replace it to:

teamPluginGui.TeamFrame.ColorPicker.ColorShower.BackgroundColor3 = Color3.fromRGB(R,G,B)
1 Like

I got this error after I made that change and made the team’s color and name the variables I set for them:

image

You have put the BackgroundColor3 as the argument to BrickColor.new, which isn’t the way it works ( it takes R, G, B as the arguments)

local R = teamPluginGui.TeamFrame.ColorPicker.ColorShower.BackgroundColor3.R
local G = teamPluginGui.TeamFrame.ColorPicker.ColorShower.BackgroundColor3.G
local B = teamPluginGui.TeamFrame.ColorPicker.ColorShower.BackgroundColor3.B
BrickColor.new(R, G, B)

And wait, what is the 31st line? It’s hard for me to understand since there aren’t line numbers

The code works now, but there are some errors.

I fixed the error, autocomplete made me type Color3 instead of color. I am still getting some errors and warnings:

I am some times getting this one error that says: “Cannot make multiple plugin buttons” or something like that.

image

Code:

You can’t make multiple plugin buttons with the same name in the same toolbar as far as i know, so since you probably have multiple duplicates of the plugin it will happen

1 Like

Yeah I do have that.

image

I’ll delete the other file that I don’t need, but I’m not sure what is causing the warning, the warning only appears when I close the gui, so I think that is why it’s happening.

the

while task.wait() do

end

loop doesn’t stop after the GUI is deleted, trying to do WaitForChild for something that isn’t there, a fix to it would be:

while enabled do
	local R = tonumber(teamPluginGui:WaitForChild("TeamFrame").ColorPicker.R.Text)
	local G = tonumber(teamPluginGui:WaitForChild("TeamFrame").ColorPicker.G.Text)
	local B = tonumber(teamPluginGui:WaitForChild("TeamFrame").ColorPicker.B.Text)

	teamPluginGui:WaitForChild("TeamFrame").ColorPicker.ColorShower.BackgroundColor3 = Color3.fromRGB(R, G, B)
	task.wait()
end
1 Like

That fixed it! I’ll mark your reply as the solution once I test the plugin, though if there is an another error that I can’t fix, I’ll reply again.

Plugins work outside the client/server boundary of Roblox. Plugins exist only in Studio.
You might want to look at Building Studio Widgets and Intro to Plugins.

Generally you do not put your UI in CoreGUI unless you have a compelling reason to do so.

1 Like

I’ll look into that, thank you!

The error that only sometimes appears showed up again even after I deleted the cloned plugin.

image

Once you delete the local plugin, it doesn’t get rid of the toolbars it created, after a studio restart it will

1 Like

I just closed the baseplate I was working on and opened a knew one, the cloned plugin’s toolbar icon went away but the error stayed, and even when I restart studio, the error still persists. Any idea as to why?

No idea honestly, are you 100% sure there’s nothing left from it in the plugins folder? There aren’t any cloned (old versions maybe) versions of the plugin

I just remembered that I published an older version of my team adder plugin to roblox, but the names are different so I don’t really think that is the reason.

Try publishing the current version to the published plugin then restart, if it doesn’t fix the issue I will try to replicate it so i can tell where the issue is coming from

I just did and the error still appeared.

EDIT: Also, the error is coming from line 6, which is:

local newTeamButton = toolbar:CreateButton("Make a team", "Add a team", "rbxassetid://28718513")

image
Interesting, I didn’t even have to upload it twice or something

local plugin: Plugin = plugin
local pluginGui = script.Parent:WaitForChild("ScreenGui")

local enabled = false

local CoreGui = game:GetService("CoreGui")

local toolbar = plugin:CreateToolbar("h")
local btn: PluginToolbarButton = toolbar:CreateButton("test", "h", "rbxassetid://19419721", "the")
btn.Click:Connect(function()
	enabled = not enabled
	
	if enabled then
		pluginGui.Parent = CoreGui
	else
		pluginGui.Parent = script.Parent
	end
end)

^ the code i used