Topbar+ button open/close issue

As you can see, I use Topbar+, and in the first seconds of the video down below, the button is expanding on hover. But when I stop hovering, the button doesn’t get small again. How do I fix this?


I do it like this:

Button.selected:Connect(function()
	Main()
end)
Button.deselected:Connect(function()
	Main()
end)
Button.hoverStarted:Connect(function()
	Button:setLabel("DevConsole")
end)
Button.hoverEnded:Connect(function()
	Button:setLabel()
end)
1 Like

I don’t think anyone can provide you with a solution without seeing your function. I suspect that you’re not handling the resize so I implemented it here in a hacky way:

local defBtnSize = Button.Size -- Default Button Size
Button.selected:Connect(function()
	Main()
end)
Button.deselected:Connect(function()
	Main()
end)
Button.hoverStarted:Connect(function()
	Button:setLabel("DevConsole")
end)
Button.hoverEnded:Connect(function()
	Button:setLabel()
	
	Button:TweenSize(
		UDim2.fromScale(defBtnSize), 
		Enum.EasingDirection.InOut, 
		Enum.EasingStyle.Quad, 
		0.5, 
		true
	)
end)
1 Like

In fact, I believe you might be using some sort of module by somebody else, so your settings button won’t be moved unless you implement it into the code too.

You should ask the person that made your module for further assistance or post a reference to the module code here…

1 Like

The person who made the module was ForeverHD. Topbar+ is a resource.

1 Like
Button.hoverEnded:Connect(function()
	Button:setLabel()
end)

The solution to this problem lies within the call to the function “Button:setLabel()”.

1 Like

Sorry for the late response, but I am already doing that, as seen by the script.

1 Like

I don’t really have a solution as I have not used Topbar+ yet, just a small tidbit of knowledge that you might not have know. When calling :Connect on a RBXScriptSignal | Roblox Creator Documentation the passed argument is a function, and any values passed when the function was fired are passed on to the connected function. Because of this you don’t have to do:

You can instead simplify it to:

Button.selected:Connect(Main)