I’d say make it only change the theme when selected. As in bind it to the selected event
dawg Its fixed now yk
How could I combine these two text labels into one icon?
EDIT:
I figured out I just had to use Rich Text to make it work;
fpsIcon:setLabel("<b>FPS: " .. tostring(fps).."</b> Ping: " .. math.modf(avgPing) .. " ms")
Works flawlessly.
anyone know if its possible to have an dropdown inside of an dropdown?
What is happening here?
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Icon = require(ReplicatedStorage.SharedModules.Premade.Icon)
Icon.new()
:setImage(2243841635)
:setLabel("Leaderboard")
:setCaption("Open Leaderboard")
:bindToggleKey(Enum.KeyCode.Tab)
:align("Right")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Players = game:GetService("Players")
local localPlayer = game:GetService("Players").LocalPlayer
local playerGui = localPlayer.PlayerGui
local iconModule = ReplicatedStorage:FindFirstChild("Icon", true)
local Icon = require(iconModule)
local Sound = game:GetService("SoundService")
local playersettings = playerGui.PlayerSettings
local showtxt = playersettings.ShowText
local muteMusic = playersettings.MuteM
Icon.new()
:setName("TxtIcon")
:align("Left")
:setImage(15674410240)
:setLabel("Hide", "Show")
:setCaption("Settings for Info-Txts")
:bindEvent("deselected", function(icon)
icon:setLabel("Hide", "Show")
showtxt.Value = false
end)
:bindEvent("selected", function(icon)
icon:setLabel("Show", "Hide")
showtxt.Value = true
end)
Icon.new()
:setName("MuteIcon")
:align("Left")
:setImage(7248002480, "deselected")
:setImage(7248002631, "selected")
:setLabel("Mute", "Viewing")
:setCaption("Settings for Radio")
:bindEvent("deselected", function(icon)
icon:setLabel("Mute", "Viewing")
Sound.MusicSounds.Volume = 1
muteMusic.Value = false
end)
:bindEvent("selected", function(icon)
icon:setLabel("Unmute", "Viewing")
Sound.MusicSounds.Volume = 0
muteMusic.Value = true
end)
When even i try to Mute music and hide the hide the Text the mute will get automaticly enabled agian even thoe i disabled it…
Why dose this happen?
robloxapp-20241118-1625557.wmv (575.4 KB)
Why must a person download a video to watch it ?
Can’t you just drop it in the forum like others do ?
kinda embarrassing …Dont know how…
It’s ok… we all learning still … but on PC… just drag & drop it … while creating a post… (or search on hard drive)
Many are suspect… and won’t download bcoz of bugs/viruses
When i try it still is going to be a download for some reason…
robloxapp-20241118-1625557.wmv (575.4 KB)
How do I use the selected event for buttons in a dropdown menu? I tried this myself, and the console is printing “attempted to index nil with ‘selected’”.
Code
local unitlist = require(game:GetService("ReplicatedStorage").Unitstatsclient)
local event = game.ReplicatedStorage.spawn
local iconlist1 = nil
local iconlist2 = nil
local iconlist3 = nil
local Icon = require(game:GetService("ReplicatedStorage").Icon)
local unitdropdown = Icon.new()
:align("Right")
:setLabel("Units")
:modifyTheme({"Dropdown", "MaxIcons", 3})
:modifyChildTheme({"Widget", "MinimumWidth", 158})
:setDropdown({
iconlist1 = Icon.new()
:setLabel(unitlist.Units.Unit1.Name),
iconlist2 = Icon.new()
:setLabel(unitlist.Units.Unit2.Name),
iconlist3 = Icon.new()
:setLabel(unitlist.Units.Unit3.Name),
})
iconlist1.selected:Connect(function(fromSource)
local tospawn = "Unit1"
event:FireServer(tospawn)
end)
I think it’s because it’s a .wmv file. You would have to convert it to an mp4.
Try not to use Roblox’s recording tab, as it produces these. There are better ways.
Can we please get a fix for the wally installation
Been broken for over 2 months (and I imagine longer, since 3.0.2 came out)
icon:bindEvent(“selected”, function()
– code
end)
I don’t know what this is. If you are going to help someone, you need to explain, not just send a snippet of code.
They mean that you can do it like so:
iconlist1:bindEvent("selected", function()
local tospawn = "Unit1"
event:FireServer(tospawn)
end)
What you tried to do is in the documentation, not sure why you’re getting the error.
Now it says, “attempt to index nil with bindEvent”
Read the API then; Its pretty self-explanatory and should make sense just by reading it. ‘icon’ is the individual icon you are reffering to.
I did read the API, that’s how I made my previous code, and yet it doesn’t work.