Hello @ForeverHD,
Is there any way to completely destroy the icon without using setEnabled and stuff?
Hello @ForeverHD,
Is there any way to completely destroy the icon without using setEnabled and stuff?
Its rather simple.
icon:Destroy()
Make sure the property ResetOnSpawn
is off.
how can i move the gui icon to the middle?
or the top right part of the game. Found out how to do it
Any way to make a ping counter?
Oh, xD. I couldn’t find it anywhere! Thanks for letting me know.
how do i set the click sound because i found the click sound in the button in playerguis.
I really need this feature in my game… I’ve been looking everywhere but I can’t find how to link a Gui with one of the dropdown icons… I’m not a scripter, but I’ll look harder. I’d appreciate it if anyone tries to help because I need this in my game quickly! @ForeverHD
You are looking for Icon.selected:Connect()
and Icon.deselected:Connect()
.
Hello, how would I use both an image and a NumberSpinner in an Icon?
Nevermind, I got it to work. For anyone questioning my genius, this is what I basically did:
local Icon = require(ReplicatedStorage.Modules.Icon)
local IconController = require(ReplicatedStorage.Modules.Icon.IconController)
local NumberSpinner = require(ReplicatedStorage.Modules.NumberSpinner)
local CoinsIcon = Icon.new()
CoinsIcon:setTip("Coins")
CoinsIcon:setName("Coins")
CoinsIcon:setSize(32 * 4, 32)
CoinsIcon:setImage(8356006239)
CoinsIcon:setLabel("LOADING")
CoinsIcon:setRight()
CoinsIcon:lock()
local CoinsUI_Label = PlayerGui:WaitForChild("TopbarPlus"):WaitForChild("TopbarContainer"):WaitForChild("Coins"):WaitForChild("IconButton"):WaitForChild("IconLabel")
local CoinsCounter = NumberSpinner.fromGuiObject(CoinsUI_Label)
CoinsCounter.Decimals = 0
CoinsCounter.Prefix = ""
CoinsUI_Label.TextTransparency = 1
IconController.clearIconOnSpawn(CoinsIcon)
--// Whenever changing the number:
CoinsCounter.Value = 10000
CoinsIcon:setLabel(10000)
My issue is when I do, it doesn’t work or it either destroys the dropdown completely.
May you show what your script currently looks like so I can try and help you fix this issue?
Yoo small question, but how do I make it so it removes the old icons in case of cloning? Due to the position of my localscript (inside a folder inside the players backpack) it clones/duplicates everytime the player dies, might sound weird but dying is one of the key functions in my experience.
how would I allow players to toggle multiple buttons? Like if I add a mute music button, if they press a different button it’s no longer toggled.
Just came across this myself.
A quick look at the documentation shows that icons have a setting called
deselectWhenOtherIconSelected
, so a simple
Icon.deselectWhenOtherIconSelected = false
(or with :setProperty()
as described here)
achieves what you’re trying to achieve.
I just wanted to ask, is there a built in function that allows you to change a text-label’s property?
For some reason i can’t use more than 1 icon at the same time, could you fix it please? because it’s really annoying, if possible