Is this still worth using now even with the other methods
Just today, I ran into an issue where I reset, and respawn the button clones itself. And only one of the two buttons works. If you keep resetting it keeps cloning and I believe this isn’t intended behavior?
Is the icon creator script on StarterPlayerScripts? And the other icon should open a gui?, if that the case, try disabling ResetOnSpawn on that gui
Yes it’s in StarterPlayerScripts, and it opens a gui which has ResetOnSpawn disabled
i don’t know whats causing this
Can you show us your code?
I re-added Icon and put the same code in, it works perfectly fine now
I believe I was just using an outdated version
Question? How would I get the players region so the state they are in and display it? Like Region: Oregon
You can use LocalizationService:GetCountryRegionForPlayerAsync() to get the country code,
then you can use icon:setLabel()
and put the country code or the country flag
You can use the code on this tutorial to get the country flag:
Convert Player Region ID into the associated Flag Emoji - DevForum | Roblox
How do I touch the button when I open it, a sound sounds
You can use SoundService for this:
local sservice = game:GetService("SoundService")
local sound = Instance.new("Sound")
sound.SoundId = "rbxassetid://AudioId"
icon.deselected:Connect(function()
sservice:PlayLocalSound(sound)
end)
icon.selected:Connect(function()
sservice:PlayLocalSound(sound)
end)
put the sservice:PlayLocalSound(sound)
on the :bindEvent
I wonder why I got error "attempt to call a nil value " on line 14?
local rep = game:GetService("ReplicatedStorage")
local IconController = require(game:GetService("ReplicatedStorage").Icon.IconController)
local plr = game.Players.LocalPlayer
local UI = plr.PlayerGui
local char = plr.Character or plr.CharacterAdded:Wait()
local head = char:WaitForChild("Head")
local Icon = require(rep.Icon)
local Backpackicon = Icon.new()
:setImage(6870729295)
:setLabel("Backpack")
:bindToggleKey(Enum.KeyCode.B)
:setTip("Access backpack")
local Flashlight = Icon.new() -- Here is da error:Đ
:SetTitle("Flashlight")
:setRight()
:setTip("Turn on/off flashlight (L)")
:bindToggleKey(Enum.KeyCode.L)
The module was in RepilcatedStorage and local script is in StarterPlayerScript
Hi, I tested it and the error is:
use :setLabel("Flashlight")
instead of :SetTitle, which doesn’t exists (Also the error was the upper case S)
someone knows how to make a HideGuis with the top bar
when I set my topbar to the right side and disabled all core gui then it won’t repositioned correctly
How are you disabling the core GUIs and what does your icon construction code look like?
Doing game:GetService("StarterGui"):SetCoreGuiEnabled(Enum.CoreGuiType.All, false)
for example with the latest version of TopbarPlus appears to work fine:
Like this:
game:GetService(“StarterGui”):SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false)
game:GetService(“StarterGui”):SetCoreGuiEnabled(Enum.CoreGuiType.PlayerList, false)
game:GetService(“StarterGui”):SetCoreGuiEnabled(Enum.CoreGuiType.Emotes, false) – For R15 users that should appear who owned emotes in their avatar
Also I don’t disable chat
Change Enum.CoreGuiType.Emotes
to Enum.CoreGuiType.EmotesMenu
.
If it still doesn’t work then please share your icon construction code.
local function CheckRigTypes()
if Humanoid.RigType == Enum.HumanoidRigType.R6 then
StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.EmotesMenu, false)
else
StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.EmotesMenu, false)
end
end
Maybe I fixed