Hey there! I’m having a bit of an issue here with the module, the two icons interfere with eachother? I don’t quite know what I did wrong here but the code is here:
Script 1
local rs = game:GetService("ReplicatedStorage")
local icon = require(rs:WaitForChild("Icon"))
function createicon(id)
local newicon2 = icon.new()
newicon2:setImage("rbxassetid://" .. id)
newicon2:bindEvent("selected", function()
script.Parent.HelpMenu.Visible = true
end)
newicon2:bindEvent("deselected", function()
script.Parent.HelpMenu.Visible = false
end)
end
createicon(10951216726)
Script 2
function createicon(id)
local newicon = icon.new()
newicon:setImage("rbxassetid://" .. id)
newicon:bindEvent("selected", function()
workspace.BGM:Pause()
end)
newicon:bindEvent("deselected", function()
workspace.BGM:Resume()
end)
end
createicon(6824924955)
Everytime I click on the music pause button, it also interferes with the help button? No clue why.
I don’t know how I can describe this issue, but when you move your mouse on the edge of the icon on the X axis in the center it kinda glitches. Here’s a video:
Could you add :WaitForChild() in Icon module?
I recently started to have errors when LocalScript running in ReplicatedFirst is waiting for Icon, but in the time of requiring other sub-modules aren’t present yet:
I already did fixed some of them and I forgot to take a proof of the error, but it seems I didn’t cover everything so here is the proof. (For example I edited iconModule.IconController to iconModule:WaitForChild("IconController").) I also think others could use this update, too, instead of just fixing it localy in my place.
Is there a way to dynamically add and remove items from an icon’s drop down? For example, I’m working on a button where a player can click it to show a list of all of the players in the game via a drop down. Is there a way to handle this logic without having to externally add in icons to the drop down frame?
Hey all. I’m new to using TopbarPlus. I have to say, It’s a great tool! However, I’ve had some issues. Everything works besides the settings dropdown I’ve been trying to add. I’m simply trying to make it change it’s name when toggled as a test, but it’s just not working. It gives me an error saying "attempt to index nil with ‘setLabel’
Does anyone know how to fix this?
I’m pretty sure that doing :setLabel(...) inside the function is not possible. You have to define the main icon as the variable first, then specify the icon variable before the function.
Thanks for the quick reply. I found the solution after looking at the dropdown example in the TopbarPlus Playground. Now I just need to implement my existing working code into it. Thanks!
Thanks! It’s been a while since I added this settings dropdown, and I’ve added a lot of more things since then. I’ve wondered about this for a while, but is it possible to make my settings dropdown save for the player?