Does the module not have type casting?
Unfortunately it doesn’t have type casting
Dunno if you got around to fixing this yourself yet, as its been an exact month now, but I’ve been browsing this module for over a day now, all you have to do is use the :oneClick() method built into the module.
Example:
Icon.new()
:oneClick(true)
Further info about all its modules can be found here, as this is where I usually browse.
On another note, if anyone has been able to create a dropdown that is customizable into a scroller used for volume or anything like that, I’d like to see how you were able to do so. The only workaround I’ve been able to muster up so far is to ditch the entire dropdown system within the module, and simply enable a completely new gui upon selected or deselected.
Honestly, with the new UIDragDetectors that Roblox has added, it would be cool to see a built in version of the sliders within the module, though the creator of the module is most likely completely burnt out from working on this project for a while.
How could I make a custom border to the topbar button? I can’t seem to figure out how
For some reason it creates duplicates whenever I load in to the game. I’ve tried so many times to fix this. I’ve literally followed tutorials word for word and it still hasn’t worked. I tried reimporting the model by deleting it from my inventory and adding it again because maybe it was an old version, but no. Still did NOT work.
The script is in StarterPlayerScripts and the runcontext is “Client”:
--services
local rs = game:GetService("ReplicatedStorage")
--folders
local sharedfolder = rs:WaitForChild("Shared")
--modules
local icon = require(sharedfolder.Icon)
icon.new()
:setImage(6294113357)
:oneClick(true)
I have a issue, I created this to open and close my main menu but if the main menu exists in playerGUI but not enabled it wont work but if it is enabled it works perfectly.
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Players = game:GetService("Players")
game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.PlayerList, false)
local iconModule = ReplicatedStorage:FindFirstChild("Icon", true)
local Icon = require(iconModule)
local Player = Players.LocalPlayer
local PlayerGui = Player.PlayerGui
local MainUI = PlayerGui:WaitForChild("Main_UI")
-- Main Context Menu
Icon.new()
:align("Left")
:setName("Main_Menu_Button")
:setLabel("HOME")
:setCaption("Opens Main Menu")
:bindToggleKey(Enum.KeyCode.Q)
:setImage(6026568198)
:setMenu({
Icon.new() -- Map Menu
:setCaption("Map")
:setImage(6034684930)
:bindToggleKey(Enum.KeyCode.M)
,
Icon.new() -- Main Screen
:setCaption("Full Screen Menu")
:bindToggleKey(Enum.KeyCode.P)
:setImage(6026568198)
:bindEvent("deselected", function(icon)
MainUI.Frame.Visible = false
end)
:bindEvent("selected", function(icon)
MainUI.Frame.Visible = true
end)
:oneClick()
,
})
It is showing the error: Frame is not a valid member of ScreenGUI “Main_UI” but it is a valid member…
I figured out what is causing it but not how to solve it. Basicly it works until my charter resets or dies, once it resets or dies then it breaks, When I placed script into startergui instead of starter player scripts it works but duplicates icons everytime I die.
Hi! Just started using this for a small game i’m making, LOVE IT! But how do I make it so when I select something it calls a function? I can’t understand how to do it, any help appreciated!
Place the script into StarterGUI inside a GUI object. Remove the reset on spawn option for the GUI that the script is inside, and that fixes the issue.
I mean like how do I call a function when the topbar is pressed? Sorry if I missed something in the forum post
that would have answered it !
Hello Shady,
To fun a function when the object is selected follow this:
:bindEvent("selected", function(icon)
Enter the code you want to run here
end)
Thanks so much, this will help a lot! It must count as reading posts just having devforum open bcz last time I checked I didnt have perms to post
No worries, I know the documentation is not the best either.
Incase anyone wants more customizability, I have done the following structure,
Local script for calling functions inside a ScreenGUI with Reset on spawn disabled in starter GUI, Fixes certain functions not working after player dies
Icon Module in replicated storage
ReplicatedStorage > Storage > Modular_Scripts > Icon
And all Icon codes are in separate modular scripts
ReplicatedStorage > Storage > Modular_Scripts > ICON_SCRIPTS
This helps to keep all scripts tidy, I will post example codes here and screenshot of structure
Surface GUI Localscript Code:
local Module = game:GetService("ReplicatedStorage").Storage.Modular_Scripts.ICON_SCRIPTS
Timer = require(Module.TIMER)
Invite = require(Module.Invite_Icon)
Home = require(Module.Home_Menu)
Mute = require(Module.Mute_Button)
Premium = require(Module.Premium_Purchase)
Fpoint = require(Module.FLAG_Points)
FPS = require(Module.FPS)
Timer()
Invite()
Home()
Mute()
Premium()
Fpoint()
FPS()
FPS Module
local FPS = {}
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Modules = ReplicatedStorage.Storage:WaitForChild("Modular_Scripts")
local Icon = require(Modules.Icon)
local RunService = game:GetService("RunService")
local TimeFunction = RunService:IsRunning() and time or os.clock
local LastIteration, Start
local FrameUpdateTable = {}
FPSM = Icon.new()
:setOrder(2)
:align("Left")
:setName("FPS")
:setLabel("FPS")
:lock()
local function HeartbeatUpdate()
LastIteration = TimeFunction()
for Index = #FrameUpdateTable, 1, -1 do
FrameUpdateTable[Index + 1] = FrameUpdateTable[Index] >= LastIteration - 1 and FrameUpdateTable[Index] or nil
end
FrameUpdateTable[1] = LastIteration
local FPS = (math.floor(TimeFunction() - Start >= 1 and #FrameUpdateTable or #FrameUpdateTable / (TimeFunction() - Start)))
FPSM:setLabel("FPS: "..FPS)
end
Start = TimeFunction()
RunService.Heartbeat:Connect(HeartbeatUpdate)
return FPS
How do you make a dropdown and where are the images? I used an image but it doesn’t show up, does it have its own images or can you use any old roblox ID?
Yo, im having problems.
I want the UI for my topbarplus to be more like the old topbar plus, is there any possible way to do that?
Why are you creating a free KJ game? That is a one non stop ticket to getting your account deleted in no time (Why you ask? For copyright violation and DMCA!)
They own the assets, you are using stolen assets.
In the background I can see their map too, just stop before your account gets banned man.